New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'Can only add notification blocks from within runloops.' #11
Comments
Figured it out. Thanks. |
👍 |
:/ I'm having a problem with this now, and I'm not sure how to solve it. Could you post your fix, please? |
Unfortunately there's nothing more to the exception "Can only add notification blocks from within runloops." than it already says. There is no fix for this, you need to subscribe for notifications from a thread with a runloop |
Ah. Where can I read up on runloops? I've never seen this before. |
Your main thread has one installed by default, and your newly spawned background threads don't. You can read more here: https://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/Multithreading/RunLoopManagement/RunLoopManagement.html |
I'll read that, thank you! Is there a reason that runloops aren't handled inside the asObservable() method? |
This is a limitation of Realm, it hasn't anything to do with the rx extension. |
If you'd like to read a complete post about reading/writing from different threads have a look here: https://realm.io/news/marin-todorov-realm-rxswift/ |
Epic! Thank you |
I'm getting this exception in my app, not sure how I get it to this state...
Posting an issue/question here to see if anyone has the same issue.
The text was updated successfully, but these errors were encountered: