JRuby volatility inside mutex#sychronize

In the JRuby github wiki, it lists “Using thread-synchronization
primitives
like Mutex.” as one of the things that are volatile. Does this only
apply
to the mutex object itself, or also to any instance variables I access
inside the synchronize block?

It only applies to the mutex itself; instance variables are not
guaranteed to be volatile anywhere in Ruby.

We are hoping to work with other implementers to come up with
volatility guarantees for instance vars in the future.

  • Charlie

On Wed, Apr 24, 2013 at 2:28 PM, Mohamed Hafez