On 9/17/06, khaines / enigo.com <khaines / enigo.com> wrote:
> On Mon, 18 Sep 2006, Joel VanderWerf wrote:
>
> > I wish I had an easy answer to this problem, but I don't. Are timeout and
> > ensure inherently incompatible?
>
> I don't have an answer, but what if you make your ensure section into a
> critical section?
>
> ensure
>    Thread.critical = true
>    # do stuff
>    Thread.critical = false
> end
>
>
> Kirk Haines

There is still the race problem if the exception gets raised just
before the Thread.critical.

I'm not sure if it is really possible in this case.  It depends if the
implentation allows thread switching just after entering an ensure but
before executing any code.  You will have to ask gurus on this one.

-- 
I'm trying to launch the internet; so I open a terminal and go
"percent sign 'Internet'" at the prompt and it doesn't work. What
gives??!! -- random troll