Aborting threads
Aborting threads
- Subject: Aborting threads
- From: Timothy Larkin <email@hidden>
- Date: Sun, 24 Feb 2002 11:39:08 -0500
Say I have a thread created by detachNewThread. Then I want that thread to
abort, because the NSDocument that the thread was serving has been closed.
How do I cleanly abort the thread? I tried setting a flag that would cause
the thread's loop to terminate, but this caused the application to crash.
while (!flag && (x = [enumerator nextObject])) { ... }
causes the while to terminate if flag = YES; but then the program crashes
with signal 10 or 11. If the while terminates because the enumerator
finishes, the program does not crash.
--
Timothy Larkin
Abstract Tools
Caroline, NY
_______________________________________________
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.