waiting for an NSThread
waiting for an NSThread
- Subject: waiting for an NSThread
- From: John Zorko <email@hidden>
- Date: Sun, 12 Oct 2008 20:42:16 -0700
Hello, all ...
I've another n00b Cocoa question: How can I wait for a thread to
finish without depending on a flag that may be reset and set before
the thread i'm waiting for has time to check it? For instance, in
Win32 (i'm not saying Win32 is the best, it's just what i've the most
experience in), I can ::WaitForSingleObject(thread_id). In Cocoa,
once I start the new thread via NSThread detachNewThreadSelector(),
how can I be sure it ended i.e. how can I wait for it to end before
starting another? Can I have Cocoa notify me when a thread ends, like
it notifies me when an observed property changes?
Regards,
John
Falling You - exploring the beauty of voice and sound
http://www.fallingyou.com
_______________________________________________
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