From: Yohanes Santoso Date: 2005-02-27T17:43:47+09:00 Subject: Re: assignments and thread safety Csaba Henk writes: > Is "$a ||= 1" thread safe? I'd guess so, as "||=" is one piece of It is not guaranteed to be thread-safe, although in current official ruby vm it is 'atomic'. > Is it just an accident, or we can know somehow that this code is thread > safe? Where do the limits of thread safety lie? Treat it as an accident and don't depend on this behaviour. You should synchronise access to shared resources. > Csaba Yours, YS.