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 <cocoa...@xericdesign.com> 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 (Cocoa-dev@lists.apple.com) > > 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: > https://lists.apple.com/mailman/options/cocoa-dev/dave.fernandes%40utoronto.ca > > This email sent to dave.fernan...@utoronto.ca _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com