some advice on asynchronous control please
some advice on asynchronous control please
- Subject: some advice on asynchronous control please
- From: Damien Cooke <email@hidden>
- Date: Sat, 20 Feb 2010 08:36:24 +1030
Hi All,
I have a situation where I am using a 3rd party library to manage content on their service. When I delete an entry the method requires a call back all good. Now I need to wait for that call back to be called to know if it was successful or not. In the call back I can set a boolean to indicate success or not but waiting for that to be set is my issue. What is the right way to wait for it?
I think
while(!done)
{
[NSThread sleepForTimeInterval:1];
}
Just blocks the main thread which is not what I want at all as this also blocks the run loop also.
Can anyone give me some guidance on the best practice for this situation?
Regards
Damien_______________________________________________
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