From: "Thomas B." Date: 2008-09-05T15:56:20+09:00 Subject: Re: about critical section Difei Zhao wrote: > Basically, I have to implement a critical section like this to avoid > race condition: I think you can use Mutex. First require 'thread' $mutex=Mutex::new and then $mutex.synchronize\ { # your critical section } TPR. -- Posted via http://www.ruby-forum.com/.