RxSwiftCommunity / RxCoreData

RxSwift extensions for Core Data
MIT License
164 stars 68 forks source link

Run the NSFetchedResultController on a PrivateQueueConcurrencyType context #8

Closed serluca closed 8 years ago

serluca commented 8 years ago

Hi @scotteg

This should fix the issue #7 The behaviour implemented is the one described in this comment https://github.com/RxSwiftCommunity/RxCoreData/issues/7#issuecomment-226784513

Nothing changes in terms of usage, but when calling rx_entities on the Main Thread doesn't block it.

Note: I also tried to implement FetchedResultsControllerSectionObserver using the same concept, but I don't know if there is a way to convert a NSFetchedResultsSectionInfo on a different context. I have an idea but we can discuss on it later.

scotteg commented 8 years ago

Thanks @serluca. I made a few minor changes and accepted your PR. Not sure about your question but glad to discuss it with you.