Is there an NSThread equivalent of suspend/resume?

Benjamin Stiglitz ben at tanjero.com
Mon May 7 18:26:53 PDT 2007


> Ideally, I'd like to have my main thread suspend a rendering thread  
> after it completes, and then resume it once it has queued up a new  
> rendering task. I couldn't find support for this in the  
> documentation for threads. Is there an equivalent of suspend/resume  
> calls for threads as opposed to NSTasks? If so, what are the calls  
> and where are they documented? Some sort of "wake early" call would  
> also solve my problem (a call, performed from the main thread, that  
> would wake a rendering thread from sleep before its sleep interval  
> had elapsed)

Check out NSConditionLock. You can have your app lock and unlock when  
there’s data ready.

-Ben


More information about the MacOSX-dev mailing list