waiting for async callback in main thread
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