• 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: What's better a separate run loop or separate thread?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What's better a separate run loop or separate thread?


  • Subject: Re: What's better a separate run loop or separate thread?
  • From: Dustin Voss <email@hidden>
  • Date: Sun, 11 Jul 2004 15:05:09 -0700

On 10 Jul, 2004, at 2:12 AM, Ken Tozier wrote:

I have a number of processes that need to run constantly in the background while my app does other things and I'm wondering if it would be better to create dedicated run loops for them with NSTimers for the required methods or to fork a thread with a timer.

If you go the thread route, here are some helpful classes:

ThreadWorker, http://iharder.sourceforge.net/macosx/threadworker, lets you run and stop a thread, and will inform you when the thread has completed its work. This may not be applicable to you.

InterThreadMessaging, http://homepage.mac.com/d.j.v./FileSharing10.html, lets your main and worker thread send messages or notifications to each other.

You may also want to check out http://cocoadev.com/?NSThread, which has some advice on threading.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >What's better a separate run loop or separate thread? (From: Ken Tozier <email@hidden>)

  • Prev by Date: Re: Compositing Tricks?
  • Next by Date: Re: Compositing Tricks?
  • Previous by thread: Re: What's better a separate run loop or separate thread?
  • Next by thread: Re: What's better a separate run loop or separate thread?
  • Index(es):
    • Date
    • Thread