Re: Yielding an NSThread-started thread
Re: Yielding an NSThread-started thread
- Subject: Re: Yielding an NSThread-started thread
- From: Alastair Houghton <email@hidden>
- Date: Wed, 22 Nov 2006 00:41:58 +0000
On 21 Nov 2006, at 16:52, John Stiles wrote:
You can just call usleep() to give up your quantum for as long as
you want.
Actually you have to be careful with usleep(). SUSv3 doesn't
guarantee that usleep() is thread safe(!) Also, it can interfere
with setitimer(), sleep(), alarm(), ualarm(), not to mention SIGALARM
generation.
Whether any of that affects Mac OS X, I don't know, but it wouldn't
surprise me if it did.
Kind regards,
Alastair.
--
http://alastairs-place.net
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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