I'm using RealmSwift
with AsyncDisplayKit
, I'm getting this error all the time from ASDataController.mm
:
libc++abi.dylib: terminating with uncaught exception of type realm::IncorrectThreadException: Realm accessed from incorrect thread.
I have a DataSourceManager
class that contains the data, and a DatabaseManager
that handles the fetch
and insert
operations.
Exception always occurs in _layoutNodesFromContexts:ofKind:completion:
.
I've tried any combination of GCD that I knew (Serial, Concurrent, Barrier), but I couldn't handle this exception.
How should I manage this situation?
Thanks!