• 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
some advice on asynchronous control please
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: some advice on asynchronous control please
      • From: Ken Thomases <email@hidden>
    • Re: some advice on asynchronous control please
      • From: Jens Alfke <email@hidden>
  • Prev by Date: Re: Overriding NSPopUpButton
  • Next by Date: Re: some advice on asynchronous control please
  • Previous by thread: Re: Overriding NSPopUpButton
  • Next by thread: Re: some advice on asynchronous control please
  • Index(es):
    • Date
    • Thread