• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSThread subclass get blocked on 'start' method call
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: NSThread subclass get blocked on 'start' method call
      • From: Jens Alfke <email@hidden>
  • Prev by Date: Re: Drawing many different strings quickly
  • Next by Date: Re: NSThread subclass get blocked on 'start' method call
  • Previous by thread: Re: ARC, blocks, capture variables
  • Next by thread: Re: NSThread subclass get blocked on 'start' method call
  • Index(es):
    • Date
    • Thread