On Fri, Feb 6, 2009 at 6:05 PM, A.M. <age...@themactionfaction.com> wrote: > Hello, > > Now that 10.5 allows one to maintain pointers to threads other than the > current thread, is it legal to call -threadDictionary for the non-current > thread? I ask because it is odd that Cocoa would allow access to address > space that the standard pthread_key/specific API would not allow.
A strict reading of the documentation would indicate that it is safe to call this method, as NSThread is marked as thread safe. However it would not be safe to then do anything with the return value, because NSMutableDictionary is not. Worse yet, it wouldn't even be safe to use the return value *from the thread it belongs to*, since it's globally visible. Practically speaking, I would say that it's only safe to use it from the thread it belongs to. I would definitely file a bug with Apple requesting that this be clarified, though. 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