• 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
checking for thread existance
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

checking for thread existance


  • Subject: checking for thread existance
  • From: Shane <email@hidden>
  • Date: Sat, 16 Oct 2010 13:44:17 -0500

I have an application which launches worker threads via NSThread's
detachNewThreadSelector: method, and once the thread is setup, it's
listening for commands from the main GUI thread.

So, what I'd like to do is know how to check to see if a thread exists
when a button is clicked where it would normally setup a new thread. I
guess I could just send a command to the thread and try to get a
response, and upon error, just assume that it should create a new
thread. But I'd think there's a better way for checking thread
existence.

Anyone have ideas on how to do this?
_______________________________________________

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: checking for thread existance
      • From: Dave DeLong <email@hidden>
  • Prev by Date: Re: NSSavePanel does replace / in the filename with a :
  • Next by Date: Re: checking for thread existance
  • Previous by thread: Re: Loading a Nib file
  • Next by thread: Re: checking for thread existance
  • Index(es):
    • Date
    • Thread