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

Re: NSOperation and waitUntilFinished


  • Subject: Re: NSOperation and waitUntilFinished
  • From: Koen van der Drift <email@hidden>
  • Date: Sat, 20 Oct 2012 13:32:08 -0400

On Oct 20, 2012, at 1:15 PM, Koen van der Drift <email@hidden> wrote:

>
> On Oct 20, 2012, at 12:53 PM, Gary L. Wade <email@hidden> wrote:
>
>> At the time when you call waitUntilAllOperationsAreFinished, no operations have been added, so there's nothing to wait on. Add the operation to the queue first and then call wait.
>> --
>
> I tried that too, but then it just stays in the operation and never finishes:
>
> start import
> begin of importRecords in operation
>
> and nothing else, it just sits there.
>
> - Koen.

So it hans, because inside my import code is the following:

            dispatch_sync(dispatch_get_main_queue(), ^{
                AppDelegate *appController = [[NSApplication sharedApplication] delegate];
                NSManagedObjectContext  *mainContext = [appController managedObjectContext];

                NSLog(@"test");


which was suggested in another question I had to be able to call executeFetchRequest on the mainContext from another thread.

Maybe that doesn't work well with calling waitUntilFinished?

- Koen.
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >NSOperation and waitUntilFinished (From: Koen van der Drift <email@hidden>)
 >Re: NSOperation and waitUntilFinished (From: "Gary L. Wade" <email@hidden>)
 >Re: NSOperation and waitUntilFinished (From: Koen van der Drift <email@hidden>)

  • Prev by Date: Re: NSOperation and waitUntilFinished
  • Next by Date: Re: NSOperation and waitUntilFinished
  • Previous by thread: Re: NSOperation and waitUntilFinished
  • Next by thread: Re: NSOperation and waitUntilFinished
  • Index(es):
    • Date
    • Thread