From: ara.t.howard@... Date: 2006-06-10T01:02:47+09:00 Subject: Re: Package idea: attempt On Sat, 10 Jun 2006, Daniel Berger wrote: > It would error out at 90 seconds no matter what (the value we set to 'max'). > I'm not sure if that's possible, however, or even how you would implement it. > Thoughts? something like: def done synchronize(:SH){ @done } end def done=d synchronize(:EX){ @done=d } end def ensure_max! @max ||= Thread.new(max, Thread.current) do |m,c| sleep max c.raise MaxError unless done end end def attempt ... ensure @max.kill end or something like that ;-) -a -- suffering increases your inner strength. also, the wishing for suffering makes the suffering disappear. - h.h. the 14th dali lama