Re: Asynchronous Notification Does NOT Work
Re: Asynchronous Notification Does NOT Work
- Subject: Re: Asynchronous Notification Does NOT Work
- From: Steve Sisak <email@hidden>
- Date: Sun, 05 Jun 2011 17:08:32 -0400
At 3:45 AM +0800 6/6/11, Bing Li wrote:
In this case, notification might occur among two threads and both of them
are not the main thread. I think I can use synchronous notification and
threading together to replace asynchronous notification. How to you think
about that?
I suspect the problem is that your RunLoop is not being run, but WAYRTTD?
If you're trying to get messages processed on a specific
thread/RunLoop and you're starting fresh, I'd highly recommend
reading TN2109, which describes a really clean way to do it:
<http://developer.apple.com/library/ios/#technotes/tn2109/>
(Works on iOS or Mac OS X)
Then steal QRunLoopOperation out of the LinkedImageFetcher sample --
read the comments to see how hard this is to do right.
HTH,
-Steve
_______________________________________________
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