https://bz.apache.org/bugzilla/show_bug.cgi?id=62404

Christopher Schultz <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|WONTFIX                     |FIXED

--- Comment #4 from Christopher Schultz <[email protected]> ---
Is a race-condition here actually a problem? Who cares if thread B sees a delay
when thread A changes that setting?

I agree with Mark, here: there are many fields in [most programs] that could be
changed to volatile, but it's just not worth it.

Marking a field as volatile requires that all accesses of that field cause a
memory barrier to occur which necessarily slows down performance. If there is a
particular reason that the field value MUST be up-to-date across all threads at
runtime, then there is a good reason to make it volatile. In this case, I see
no use at all of taking a (small) performance hit for this field.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to