Dear Jens, Thanks so much for your reply!
But I have not got a tutorial that I can follow to program RunLoop. So I decide to use threading and signal/wait to control threads. Is it fine? 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? Best regards, Bing On Mon, Jun 6, 2011 at 3:34 AM, Jens Alfke <[email protected]> wrote: > > On Jun 5, 2011, at 11:59 AM, Bing Li wrote: > > > One issue is that the notification job is done in a thread I created > explicitly. It is the potential reason? I will test it. > > Oh, that would do it. The notifications are going to be queued on that > thread’s runloop then. Did you create a runloop for it, and did you want the > notifications to be delivered on that thread, instead of the main thread? > > If you just want a background thread to post an action to the main thread, > it’s pretty easy to use -performSelectorOnMainThread:. > > —Jens _______________________________________________ Cocoa-dev mailing list ([email protected]) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [email protected]
