Description
The lock-free but non-strict initiallisation of the SoftRefReleaseThread might in rare condition construct but not start Thread objects. This is actually a leak in older java versions (and I think causes a threadgroup to not be destroyed in newer versions). In any case, this optimization is not needed as it is on a cold path, so using synchronized to set the new value is perfectly fine. (especially as the thread constructor uses synchronized methods anyway).