From: Eric Schwartz Date: 2004-08-14T06:31:52+09:00 Subject: Re: timeouts with threads and SIGALRM Lennon Day-Reynolds writes: > I realized that this probably should have been my first suggestion: > how about using the standard 'timeout' module to accomplish the same > thing? I'll see if it works. I'm currently surprised by the fact that somehow the SIGALRM I'm sending to the main process isn't apparently being received. I'm currently building an instrumented Ruby interpreter to validate that it's not Ruby's fault. > require 'timeout' > > begin > timeout(TIMELIMIT) do > my_sometimes_too_long_method() > end > rescue Timeout::Error > # Handle timeout here > end Alas, no love with this example. my_sometimes_too_long_method() just goes on forever. I guess I'll just have to wait until my instrumented interpreter finishes building. -=Eric -- Come to think of it, there are already a million monkeys on a million typewriters, and Usenet is NOTHING like Shakespeare. -- Blair Houghton.