NSRunloop + shared thread
NSRunloop + shared thread
- Subject: NSRunloop + shared thread
- From: Colin Deasy <email@hidden>
- Date: Thu, 19 Nov 2009 22:54:43 +0000
- Importance: Normal
Hey,
I have a shared thread that is used to process multiple asynchronous tasks. But at some point, a task may need to 'pause' its execution, and cannot exit its method and wait to be re-called, how can I do this? In that method, where a 'pause' instance is brought about, can I use something like the following to wait, but not block the run loop?
while(condition)[[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalFromNow:0.01]];
CheersColin
_________________________________________________________________
New Windows 7: Find the right PC for you. Learn more.
http://windows.microsoft.com/shop_______________________________________________
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