• 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: NSPrivateQueueConcurrencyType working outside of performBlock
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSPrivateQueueConcurrencyType working outside of performBlock


  • Subject: Re: NSPrivateQueueConcurrencyType working outside of performBlock
  • From: Dave Fernandes <email@hidden>
  • Date: Tue, 28 Jul 2015 10:36:29 -0400

Depending on what you are doing, you could either put doSomething and doSomethingElse inside the performBlock, or you could use performBlockAndWait

> On Jul 28, 2015, at 10:14 AM, Trygve Inda <email@hidden> wrote:
>
>
> If I do use performBlock and have to do several things:
>
> This code is sitting inside a completion block for a URL downloader
> {
>    [self doSomething];
>    [myContext performBlock (do more stuff)];
>    [self doSomethingElse];
> }
>
>
> Since the perform block will run in a different thread, how can I make sure
> the "do more stuff" is finished before calling doSomethingElse?
>
> Or in this case would using NSConfinementConcurrencyType be better since it
> is all within a completion block and presumably on it's own thread anyway.
>
>
>
>
>
> _______________________________________________
>
> 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


_______________________________________________

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: 
 >Re: NSPrivateQueueConcurrencyType working outside of performBlock (From: Trygve Inda <email@hidden>)

  • Prev by Date: Re: NSPrivateQueueConcurrencyType working outside of performBlock
  • Next by Date: Obj-c to Swift conversion question
  • Previous by thread: Re: NSPrivateQueueConcurrencyType working outside of performBlock
  • Next by thread: Re: NSPrivateQueueConcurrencyType working outside of performBlock
  • Index(es):
    • Date
    • Thread