Re: Sleeping and waking NSThread
Re: Sleeping and waking NSThread
- Subject: Re: Sleeping and waking NSThread
- From: Shawn Erickson <email@hidden>
- Date: Mon, 21 Jun 2004 10:22:28 -0700
On Jun 21, 2004, at 9:25 AM, Mark Alldritt wrote:
Hi,
I have a need to make a thread sleep until a reply arrives for an
AppleEvent. I can see how to make NSThread sleep with sleepUntilDate:
with
a sufficiently long expiration, but I cannot see a call that will wake
a
thread up again. Does anyone know how this is done?
You likely want to block the thread on a lock of some type
(NSConditionLock possibly) or connect up a event source with a run loop
(NSRunloop) running in that thread, etc.
Anyway how are you sending the AppleEvent? How are you setup to get a
reply back?
Depending on what you have it can affect what would be the best method.
-Shawn
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.