• 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
Re: some NSThread questions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: some NSThread questions


  • Subject: Re: some NSThread questions
  • From: Koen van der Drift <email@hidden>
  • Date: Tue, 1 Jun 2004 20:08:05 -0400

On May 31, 2004, at 8:42 PM, Dustin Voss wrote:

Threads can only safely stop themselves. The thread will have to periodically check a flag to see if it should keep running. When you want the thread to stop, set the flag. The thread should stop itself (by exiting -run:) the next time it checks the flag.

That is not possible with the code I am porting, I'm afraid. The original code (not mine :) is written as one long sequence of various calculations without a possibility to hook into it. Unless I really tear apart the code, but I rather leave the original code intact as much as possible, I am only wrapping it in a OS X GUI.


Thanks for the suggestion of performSelectorOnMainThread though, that works like a charm.


- Koen.
_______________________________________________
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: [ANN] AutoGraf 1.0.1 - Visual class browser
  • Next by Date: NSImageRep help please...
  • Previous by thread: [ANN] AutoGraf 1.0.1 - Visual class browser
  • Next by thread: Re: some NSThread questions
  • Index(es):
    • Date
    • Thread