On Mon, Oct 13, 2008 at 3:20 PM, Ken Thomases <[EMAIL PROTECTED]> wrote: > On Oct 13, 2008, at 9:32 AM, Scott Ribe wrote: > >> Isn't there a race condition there? Can't the thread exit before the >> observer is added? > > Well, you can register for the notification with 'nil' for the object. That > registers for all thread termination notifications. You can do that before > detaching the thread. > > Alternatively, in 10.5 and later, you can create (alloc+init) an NSThread, > register for the notification, and only then start it.
And if you must support 10.4 or below, merely register for the notification from the thread you wish to monitor. Mike _______________________________________________ Cocoa-dev mailing list ([email protected]) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
