uber-archive / ohana-ios

Contacts simplified. This project is deprecated and not maintained.
MIT License
362 stars 40 forks source link

better threading docs required. & onContactsDataSourceReadySignal is not always dispatched to the main thread #37

Open adam-zethraeus opened 8 years ago

adam-zethraeus commented 8 years ago

onContactsDataSourceReadySignal 2016-11-07 06:30:07.113 OhanaExample[71212:3367760] <NSThread: 0x7f83a6492460>{number = 2, name = (null)}

I think this was caused by the OHABAddressBookContactsDataProvider calling back on a background thread.

There's a generally larger task required here: Ohana's threading isn't very well defined. We've generally assumed operation on Main. This is fine, but the contract with dataProviders and postProcessors should be better defined to dictate how they can offset work.

maxwellE commented 7 years ago

I can feel that we should always be on main thread in our callbacks. I wonder if @Darj should complete a possible RxSwift conversion before tackling this

adam-zethraeus commented 7 years ago

yes, we should build this assumption into the framework.

Darj commented 7 years ago

Yeah from memory all this pain was to do with the callback assumptions from UBSignals, the docs should be more explicit. While the Rx port will 'fix' this we should still update it here at some point.