checking for thread existance
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