So I accept that that point too, but I am struggling to understand
it, and as a result I am doubting that even the slow (always-lock)
pattern will work:
It is my understanding that the compiler handles this by implicitly
marking variables used both inside and outside a @synchronized()
block as volatile. (In fact, I think it makes *all* variables in any
function/method containing a @synchronized() block volatile, but
don't quote me on this.)
To a first approximation, `volatile` never fixes thread-safety
problems. @try and @synchronized use `volatile` to make sure variables
have correct values if an exception is thrown.
--
Greg Parker email@hidden Runtime Wrangler
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Objc-language mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden