Re: Core Data: Progress bar using Sheet, modifying context in thread
Re: Core Data: Progress bar using Sheet, modifying context in thread
- Subject: Re: Core Data: Progress bar using Sheet, modifying context in thread
- From: Chris Suter <email@hidden>
- Date: Sat, 5 Aug 2006 14:25:49 +1000
On 05/08/2006, at 1:07 PM, Bill Coleman wrote:
On Aug 4, 2006, at 9:18 PM, Chris Suter wrote:
The guy clearly wants to run a document modal progress sheet for
an import. This implies that it's takes a non trivial time to do
it and so whilst you can carry on doing stuff after you've done
beginSheet, you have to service the run loop at some point and you
can't just periodically do this from your own loop either because
you can't control what other bits of code might do when events are
processed.
Really the only way, and correct way, to do what this guy wants to
do is to run a separate thread.
OK, so let's say we use a separate thread, and we carefully
marshall all the points where we update the progress indication by
calling a selector on the main thread.
There's still the issue of Core Data being fussy with operations
from other than the main thread.
http://developer.apple.com/documentation/Cocoa/Conceptual/CoreData/
index.html
has a section on multithreading.
- Chris
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