From: Charles Mills Date: 2005-02-08T09:30:09+09:00 Subject: Re: threading question, are ops on builtins atomic? Florian Gross wrote: > Sam Roberts wrote: > > > Can I do Array#push from multiple threads at the same time, and know > > that all the objs pushed from the threads are on the Array, in some > > indeterminate order? What about Array#delete from multiple threads, > > and know it was deleted (though only by one of the threads)? > > AFAIK yes, because there are usually no Ruby thread context switches in > C functions. But note that += and friends are not atomic. Is / will this be the case when using pthreads? in Ruby 2.0? -Charlie