On Dec 9, 2012, at 1:27 AM, Kyle Sluder wrote:

> If dispatch_once() really is unsuitable for use with a dispatch_once_t
> stored in Objective-C instance storage, then the correct example in the
> paper I've cited might be a sufficient workaround.

I thought we had established that, in all sane use cases, an instance variable 
once predicate is fine.  The cases where an instance variable once predicate 
would be unsafe are exactly the cases where it would be unsafe to access any 
instance variable, including the isa pointer.  So, if you're using the instance 
in any way, you've already assumed conditions that make the once predicate 
fine. (And, hopefully, you've more than assumed it, you've ensured it by proper 
inter-thread communication of the object pointer.)

Regards,
Ken


_______________________________________________

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to