From: "Iñaki Baz Castillo" Date: 2012-06-11T17:00:11+09:00 Subject: Re: Is "a,b=c,d" atomic? or do I need a Mutex? 2012/6/11 Robert Klemme : > 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. In my case #method2 is private and is just called by the library and always in the same thread (the thread in which a C event loop runs). I do agree that, while in Ruby land, I should use a mutex (not required right now since Array#<< and a,b=c,d are atomic, but this could change). However I'm re-writing my #method1 and #method2 in C so, for sure I don't need mutex. Please correct me if I'm wrong. Thanks a lot. -- Iñaki Baz Castillo