• 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
thread and run loop
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

thread and run loop


  • Subject: thread and run loop
  • From: Olivier Destrebecq <email@hidden>
  • Date: Mon, 31 Oct 2005 19:27:19 -0500

In my saving method for my document, i decided to offload all the work to a thread so that the progress dialog that is displayed gets updated.

Here is what i do to achieve this

start secondary thread
while (!doneSaving)
[[NSRunLoop currentRunLoop] runUntilDate: [NSDate dateWithTimeIntervalSinceNow: 0.1]];



and then resume work and return. It seems to work, but i'm not sure this is the way to do it...


is this the correct approach, should i use -run instead of - rununtildate on the runloop?

Olivier
http://otusweb.spymac.com/home/


_______________________________________________ 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: graphing data
  • Next by Date: Changes in CoreData/10.4.3?
  • Previous by thread: NSCell subclass in NSTableColumn - bindings?
  • Next by thread: Changes in CoreData/10.4.3?
  • Index(es):
    • Date
    • Thread