On 26/05/2010 4:26 PM, Ryan Rawson wrote:
Sounds like we want #1: replaceable singleton.

does that sound right?

Yep. :)

Hence volatile should be all you need in this case. It gets complicated if there's additional thread-safe logic needed in the getter or setter, but in this case that doesn't apply and volatile should give you all you need.

Cheers,

Paul

Reply via email to