• 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: MPTask equivalent?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MPTask equivalent?


  • Subject: Re: MPTask equivalent?
  • From: Charles Steinman <email@hidden>
  • Date: Wed, 20 Feb 2008 12:09:26 -0800 (PST)

--- Trygve Inda <email@hidden> wrote:

> 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?

If you can require 10.5, you might look at
NSOperation/NSOperationQueue. I haven't used the
Carbon Multiprocessing Services, but it sounds like
that should be roughly equivalent.

>
> How much of Cocoa is thread safe?

http://developer.apple.com/documentation/Cocoa/Conceptual/Multithreading/ThreadSafetySummary/chapter_950_section_2.html

Cheers,
Chuck


      ____________________________________________________________________________________
Looking for last minute shopping deals?
Find them fast with Yahoo! Search.  http://tools.search.yahoo.com/newsearch/category.php?category=shopping
_______________________________________________

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

References: 
 >MPTask equivalent? (From: Trygve Inda <email@hidden>)

  • Prev by Date: Re: using C++ class in the Obj-C file (FAILED...)
  • Next by Date: CalendarStore question
  • Previous by thread: Re: MPTask equivalent?
  • Next by thread: Re: MPTask equivalent?
  • Index(es):
    • Date
    • Thread