Code Monkey home page Code Monkey logo

Comments (3)

sync-by-unito avatar sync-by-unito commented on July 20, 2024

➤ PM Bot commented:

Jira ticket: RCOCOA-2326

from realm-swift.

tgoyne avatar tgoyne commented on July 20, 2024

Realm's notifications require a scheduler to post the notifications on. By default we use the current thread's runloop (mostly since historically that's the only thing we could use), which these days only works on the main thread unless you've specifically gone out of your way to set up a runloop on the background thread.

The simplest way to fix your test is to add a .subscribe(on:) call to your Combine pipeline, passing in a serial dispatch queue. This will result in your .sink() block being called on that queue, so if you do anything more complicated there than call fulfill() thread-safety can get complicated. Notably you can't access the realm instance from within that block and instead have to use the values passed to it as a parameter.

A more complicated approach would be to confine your entire test to an instance of an actor and do realm = try! await Realm(actor: actor), but I have no idea if Quick has reasonable support for doing that.

from realm-swift.

github-actions avatar github-actions commented on July 20, 2024

This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.

from realm-swift.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.