On Sun, Jun 10, 2012 at 7:52 PM, Iñaki Baz Castillo <[email protected]> wrote: > 2012/6/10 Bartosz Dziewoński <[email protected]>: >> It is atomic on MRI. It may or may not be on other interpreters, if >> you care about them. (But probably should be as an element of the >> syntax.) >> >> Array#<< may or may not be atomic as well. (It is on MRI.) > > Thanks, so I've no problem since I'm coding for MRI.
Sorry, but I think this is the wrong attitude. Even MRI's implementation can change and the default should be to properly synchronize access to shared resources - if only for documenting the shared access. Note also that multiple threads may invoke #method2 which makes synchronization necessary even in absence of swapping. Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/ -- You received this message because you are subscribed to the Google Groups ruby-talk-google group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at https://groups.google.com/d/forum/ruby-talk-google?hl=en
