On Thu, Jan 29, 2009 at 10:16 AM, JongAm Park <joshua_park2006-applel...@yahoo.com> wrote: > Thank you for your comment. > > Shawn Erickson wrote: >> >> A lock? As in NSLock, etc.? Why do you think you need a lock here >> given it isn't multi-thread and the fact that IO appears to be driven >> by a runloop which will serialize access for you. >> >> > > At first, I was not sure if the Run-Loop was implemented using thread or > signal. > So, I tried locking, but it turned out that it was not multithreaded from > app programmer's point of view. > It seems to be implemented using signal, so using lock was not helpful.
No, neither. A runloop uses neither threads nor signals. It's simply a loop that runs waiting on various input sources. More info here: http://developer.apple.com/documentation/Cocoa/Conceptual/Multithreading/RunLoopManagement/chapter_6_section_2.html#//apple_ref/doc/uid/10000057i-CH16-SW20 Don't let the fact that it's in the Threaded Programming Guide confuse you, runloops don't use threads. Mike _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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 arch...@mail-archive.com