Exiting NSThread
Exiting NSThread
- Subject: Exiting NSThread
- From: Dustin Mierau <email@hidden>
- Date: Sat, 29 Sep 2001 11:32:28 -0700
I have a thread that is just:
while(1)
{
blah;
}
Now before this while loop I setup an NSConnection with the main
thread. So now my app wants to quit and this thread is in this
while loop, I want to tell the thread to exit, what is the best
way to do this?
Is there a flag or something I can check in the while loop so I
know the thread should exit? The example of multithreaded DO
works, but it seems sloppy because it uses a global object to
coordinate this.
Thanks,
-Dustin