MPTask equivalent?
MPTask equivalent?
- Subject: MPTask equivalent?
- From: Trygve Inda <email@hidden>
- Date: Wed, 20 Feb 2008 19:03:46 +0000
- Thread-topic: MPTask equivalent?
I am moving a rendering engine of sorts from Carbon to Cocoa. It is heavily
based on MPTasks and uses Carbon events to send messages back to the main
event handler (on the main thread) to handle things that are not thread
safe.
In Carbon, I would Post an event and call:
err = MPWaitOnQueue (pTaskInfo->mSignalQueueID, (void **)
&pTaskInfo->mQueueMessage, NULL, NULL, kDurationForever);
if (pTaskInfo->mQueueMessage == kMyTaskSignalAbort)
pTaskInfo->mAbort = true;
When the main thread would be done with the task, it would call:
MPNotifyQueue (pTaskInfo->mSignalQueueID, (void *) kMyTaskSignalContinue,
NULL, NULL);
Is there a good online reference to the Cocoa equivalent of this?
Any pointers as to how I should structure this in Cocoa?
How much of Cocoa is thread safe?
Thanks,
Trygve
_______________________________________________
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