Re: MPTask equivalent?
Re: MPTask equivalent?
- Subject: Re: MPTask equivalent?
- From: j o a r <email@hidden>
- Date: Thu, 21 Feb 2008 16:20:23 +0100
On Feb 21, 2008, at 4:10 PM, Trygve Inda wrote:
That is, to pause a task for a fixed about of time... I have a task
that I
want to take 5 minutes to do so that I use very little processor
time. So I
frequently block for a variable amount of time.
That sounds a bit strange to me. Could you perhaps use thread
priorities instead?
Can I do this with Cocoa threads?
Perhaps you could use "-[NSThread sleepUntilDate:]"?
<http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSThread_Class/Reference/Reference.html#//apple_ref/occ/clm/NSThread/sleepUntilDate:
>
You probably also want to read up on Cocoa threads in general:
<http://developer.apple.com/documentation/Cocoa/Conceptual/Multithreading/
>
<http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSThread_Class/Reference/Reference.html
>
On Feb 21, 2008, at 4:14 PM, Trygve Inda wrote:
Just a follow up... The key here is that Carbon MPTasks allow a
message to
be passed around for thread semaphore control... Actually Cocoa
seems to not
allow any semaphore control at all.
Perhaps I don't understand what you're asking for, but in general I
don't think that's correct:
<http://developer.apple.com/documentation/Cocoa/Conceptual/Multithreading/ThreadSafety/chapter_5_section_7.html
>
j o a r
_______________________________________________
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