From: Tony Arcieri Date: 2012-11-28T05:00:21+09:00 Subject: Re: atomic statements in multithreading --bcaec555557ccb8ea704cf7f7f89 Content-Type: text/plain; charset=ISO-8859-1 On Mon, Nov 26, 2012 at 4:03 AM, ajay paswan wrote: > note mutex is not the solution, as mutex keeps thread not running a > block of code at same time, here if one thread goes to the block all > other thread should stop. I'm still not sure I entirely understand what you want, but you can make other threads block on a Queue if you would like for them to wait until some event has completed. Alternatively you can use a Mutex + ConditionVariable. -- Tony Arcieri --bcaec555557ccb8ea704cf7f7f89 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Mon, Nov 26, 2012 at 4:03 AM, ajay paswan <lists@ruby-forum.com> wrote:
note mutex is not the solution, as mutex keeps thread not running a
block of code at same time, here if one thread goes to the block all
other thread should stop.
=A0
I'm still not= sure I entirely understand what you want, but you can make other threads b= lock on a Queue if you would like for them to wait until some event has com= pleted.

Alternative= ly you can use a Mutex + ConditionVariable.

--
Tony Arcieri

--bcaec555557ccb8ea704cf7f7f89--