Some time ago, I implemented a simple threaded notification queue by following the example here:

http://developer.apple.com/documentation/Cocoa/Conceptual/Notifications/Articles/Threading.html

which basically adds an NSMachPort to the thread's runloop and calls - [NSPort sendBeforeDate:components:from:reserved:] to wake the thread up and allow it to process the enqueued notification. The same technique has worked well for queuing invocations, also. I recently noticed, however, that NSPort is explicitly listed as not being thread safe:

http://developer.apple.com/documentation/Cocoa/Conceptual/Multithreading/ThreadSafetySummary/chapter_950_section_2.html#/ /apple_ref/doc/uid/10000057i-CH12-SW4

Does this apply to NSMachPort as well? I filed a doc bug hoping for eventual clarification, but I'd rather know sooner rather than later if the code has to be rewritten. rdar://problem/5772256
_______________________________________________

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 [EMAIL PROTECTED]

Reply via email to