Re: NSThread or NSTimer
Re: NSThread or NSTimer
- Subject: Re: NSThread or NSTimer
- From: "Jonathan 'Wolf' Rentzsch" <email@hidden>
- Date: Tue, 27 Apr 2004 13:45:40 -0500
Jesus De Meyer, email@hidden, wrote:
>
I understand that NSThread is usually used with multiple document
>
applications or when you wanna use a second processor.
>
>
But for simple applications that just need some kind of update method,
>
what should I use? I ask because I have the impression that NSThread
>
will add better performance than if I use an NSTimer, although I'm not
>
sure if this statement is true.
If you need to maintain stack-based state and/or your task will take a
while to complete, use a thread. Otherwise use a timer -- it's cheaper
and you can update the GUI directly since you'd probably install it on
the main GUI thread's runloop.
| Jonathan 'Wolf' Rentzsch
http://rentzsch.com
| Red Shed Software
http://redshed.net
| "better" necessarily means "different"
_______________________________________________
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.