[Q] NSThreads and UI
[Q] NSThreads and UI
- Subject: [Q] NSThreads and UI
- From: Mark de Jong <email@hidden>
- Date: Thu, 19 Sep 2002 21:18:16 -0700
Hi!
I've got a task that gets time-consuming and I'd like to do it in its
own thread.
The main issue I'm having is that even though a method is running in
its own thread, the UI is really bogged down and doesn't function at
all.
I came across the "Threadworker" helper written by Robert Harder which
was supposed to make this better. In it, he starts the thread and then,
from within the thread, he uses NSTimer to launch the actual routine
that's supposed to run in the thread.
Unfortunately, the code does not explain why he does this. Is there an
explanation somewhere that describes why this is done?
I tried mimicking this behavior in my own thread code and the UI is
still basically stopped until the thread finishes.
I thought the threads were preemptive and that all the threads were
given equal time to process. I'm obviously missing something here.
Thanks,
-- Mark
_______________________________________________
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.