• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Yielding an NSThread-started thread
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Yielding an NSThread-started thread (From: "Philip Q" <email@hidden>)
 >Re: Yielding an NSThread-started thread (From: Alastair Houghton <email@hidden>)
 >Re: Yielding an NSThread-started thread (From: John Stiles <email@hidden>)

  • Prev by Date: Re: Re: Yielding an NSThread-started thread
  • Next by Date: Re: Yielding an NSThread-started thread
  • Previous by thread: Re: Yielding an NSThread-started thread
  • Next by thread: Re: Re: Yielding an NSThread-started thread
  • Index(es):
    • Date
    • Thread