Re: What's better a separate run loop or separate thread?
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.