• 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: Ben Haller <email@hidden>
  • Date: Tue, 30 Aug 2005 17:48:30 -0700

On Aug 30, 2005, at 5:22 PM, Ryan Britton wrote:

Here's an approach I used when implementing something similar to Finder's spotlight search window. Hopefully it should give you some idea of how I did this.

Right; if I understand your code correctly, though, you are polling the "stopThread" ivar every time through your loop. If your loop took very little time to complete one iteration, that polling would end up taking a substantial amount of the total time taken by the thread. The only solution to that (as far as anybody on the list so far seems to know) is unrolling the loop so that you only have to check the flag every x iterations. That's the problem.
Nevertheless, the code is a nice illustration of what is apparently the best way to do this sort of thing, given current APIs. I don't mean to jump on you at all. Thanks for posting it.


Ben Haller
Stick Software

_______________________________________________
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


  • Follow-Ups:
    • Re: Pausing and terminating a thread
      • From: Pandaa <email@hidden>
References: 
 >Re: Pausing and terminating a thread (From: Hamish Allan <email@hidden>)
 >Re: Pausing and terminating a thread (From: Ben Haller <email@hidden>)
 >Re: Pausing and terminating a thread (From: Ryan Britton <email@hidden>)

  • Prev by Date: Re: Tableviews like Excel ones
  • Next by Date: Re: Tableviews like Excel ones
  • Previous by thread: Re: Pausing and terminating a thread
  • Next by thread: Re: Pausing and terminating a thread
  • Index(es):
    • Date
    • Thread