• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Aborting threads
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: Re: NSMatrix - Selecting multiple cells in code
  • Next by Date: Apple Help
  • Previous by thread: Re: NSMatrix - Selecting multiple cells in code
  • Next by thread: Apple Help
  • Index(es):
    • Date
    • Thread