• 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: Pausing and terminating a thread
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Pausing and terminating a thread


  • Subject: Re: Pausing and terminating a thread
  • From: j o a r <email@hidden>
  • Date: Tue, 30 Aug 2005 08:48:29 +0200


On 30 aug 2005, at 08.23, Steve Weller wrote:

However this still requires that my worker thread poll. And doesn't take care of quitting the worker thread. Any better way?

If you're waiting for a condition lock - sleeping the thread while doing so - you're not polling. You're essentially event driven, just like you would want to be.
As for exiting the thread, just make sure that the thread under which conditions it is allowed to live / die, and let it make that decision for itself once you wake it up.


j o a r



Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Pausing and terminating a thread (From: Steve Weller <email@hidden>)
 >Re: Pausing and terminating a thread (From: j o a r <email@hidden>)
 >Re: Pausing and terminating a thread (From: Steve Weller <email@hidden>)

  • Prev by Date: Problem with converting an NSImage to grayscale
  • Next by Date: Re: hyperlinktext cursor is not changing untill focus on textview
  • Previous by thread: Re: Pausing and terminating a thread
  • Next by thread: Re: Pausing and terminating a thread
  • Index(es):
    • Date
    • Thread