On Mon, Nov 26, 2012 at 12:03 PM, ajay paswan <[email protected]> wrote:
> now I want to make step 2 and step 3 an atomic statement, it means when
> one thread goes to statement 2, every other thread should stop and run
> only when that particular thread completes step 3. Is it possible? How?
>
> 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.

Why do you want to do that?  That will cripple throughput more than necessary.

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

Reply via email to