From: MenTaLguY Date: 2007-05-12T08:25:28+09:00 Subject: Re: basic threading question: can ruby use real threads? On Sat, 12 May 2007 07:08:05 +0900, Joel VanderWerf wrote: > Can't we implement ensure_uninterruptible in such a way that > thread1.raise waits until thread1 finishes the clause (or maybe raises > an error in thread2 instead of in thread1)? Sure. But it's still not enough -- you'll notice that the examples I gave earlier were concerned with race conditions around entry of the protected section itself, not even the ensure clause. What you actually need to do is make uninterruptability the universal default; interruptability at a specific point must be specifically allowed for. -mental