From: Tony Arcieri Date: 2012-06-12T01:00:56+09:00 Subject: Re: Is "a,b=c,d" atomic? or do I need a Mutex? --000e0cd4bdc8299b7f04c23474ad Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Mon, Jun 11, 2012 at 1:00 AM, I=F1aki Baz Castillo wrote= : > I do agree that, while in Ruby land, I should use a mutex (not > required right now since Array#<< and a,b=3Dc,d are atomic Note that Array#<< isn't atomic, it's just that the GIL prevents contention between threads so it never becomes a problem (until you try to use a Ruby implementation without a GIL) --=20 Tony Arcieri --000e0cd4bdc8299b7f04c23474ad Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
On Mon, Jun 11, 2012 at 1:00 AM, I=F1aki Baz Cas= tillo <ibc@aliax.net> wrote:
I do agree that, while in Ruby land, I should use a mutex (not
required right now since Array#<< and a,b=3Dc,d are atomic

Note that Array#<< isn't atomic, it's j= ust that the GIL prevents contention between threads so it never becomes a = problem (until you try to use a Ruby implementation without a GIL)
=A0
--
Tony Arcieri

--000e0cd4bdc8299b7f04c23474ad--