NSThread subclass get blocked on 'start' method call
NSThread subclass get blocked on 'start' method call
- Subject: NSThread subclass get blocked on 'start' method call
- From: Alexey Belkevich <email@hidden>
- Date: Mon, 28 Sep 2015 19:29:34 +0300
I have problem with NSThread subclass. It's very similar to this case - http://prod.lists.apple.com/archives/cocoa-dev/2015/Sep/msg00454.html.
I have a library, that provide developer-friendly interface to AddressBook.framework. And I unable to use GCD for thread safety, because of `ABAddressBookRegisterExternalChangeCallback` function, that requires a run loop to schedule callback.
So I decided to use NSThread subclass. And found that second NSThread instance blocks main thread on `start` method call.
Here is the source code of Example - https://www.dropbox.com/s/r5k8o28pocu7afk/aptest.zip?dl=0
When you press 'load contacts' for the second time, it'll block main thread with `semaphore_wait_trap`
Any ideas?
--
Best regards,
Alexey Belkevich
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden