• 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: Sheets and NSThread
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sheets and NSThread


  • Subject: Re: Sheets and NSThread
  • From: Shaun Wexler <email@hidden>
  • Date: Thu, 8 Dec 2005 11:32:43 -0800

On Dec 8, 2005, at 9:45 AM, j o a r wrote:

How do you call back from the thread when it's done? You should be using the "performSelectorOnMainThreadXXX" methods if you aren't already.

Another suitable way to operate a progress bar is to attach a NSTimer to the main thread, to read shared data which is updated asynchronously by the worker thread(s). 1-4 updates per second is usually sufficient, because NSProgressIndicator runs threaded and smoothes its value updates using a raised cosine interpolator. There are several ways to safely manage the shared data [progress %] between threads without resorting to NSLock or inter-thread messaging/ ports.
--
Shaun Wexler
MacFOH
http://www.macfoh.com

"Problems cannot be solved by the same level of thinking that created them." - Albert Einstein


_______________________________________________
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
  • Prev by Date: Re: What is the rationale behind keeping preferences in one place and "Application Support" files in another?
  • Next by Date: Re: [SOLVED] Drag & Drop Launch
  • Previous by thread: [DO-Question] NSString works, NSImage not
  • Next by thread: displayNameForType
  • Index(es):
    • Date
    • Thread