Re: How to wait for methods with result/completion blocks to finish?
Re: How to wait for methods with result/completion blocks to finish?
- Subject: Re: How to wait for methods with result/completion blocks to finish?
- From: Kyle Sluder <email@hidden>
- Date: Tue, 08 Mar 2011 00:37:09 -0800
On Mar 7, 2011, at 9:00 PM, Chris Markle <email@hidden> wrote:
> I guess in general I an wondering how I correctly wait for things to
> happen that I absolutely positively need to be done before I
> continue...
You rework your approach to not require these things to be complete before your code continues.
Throwing up a modal "please wait" UI until the callback gets executed is a common approach whenever the user can't logically expect to proceed until the app is done with some processing. An asynchronous API is preferable because it lets you return to the runloop and process user events, rather than get stuck in a busy loop that is indistinguishable to the OS from a hung process.
--Kyle Sluder_______________________________________________
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