• 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
waiting for async callback in main thread
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

waiting for async callback in main thread


  • Subject: waiting for async callback in main thread
  • From: Alexander Cohen <email@hidden>
  • Date: Tue, 27 Oct 2009 13:40:14 -0400

Hi,

I'm working with and SDK that lets me observe objects. When the state of the object changes i receive a callback. The docs for the SDK say that the main NSRunLoop needs to stay active and responsive for me to receive the callbacks. Now, i would like to be able to wait for that callback on the main thread like this:

[object addObserverForCallback]
... wait for callback ...
continue on processing with the state of the object

The only way i see i can do that is by running the NSRUnLoop myself but if i understand correctly, it is wrong to do that. So i guess my question is what is the corect way to wait in the main thread without stopping the NSRunLoop?

thx

AC
_______________________________________________

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: waiting for async callback in main thread
      • From: Jens Alfke <email@hidden>
  • Prev by Date: Re: Interrupting auto-expansion in NSOutlineView
  • Next by Date: Mysterious crash in objc_msgSend in GC app
  • Previous by thread: Re: Using UISwitch within TabBar Application [iPhone]
  • Next by thread: Re: waiting for async callback in main thread
  • Index(es):
    • Date
    • Thread