From: Joel VanderWerf Date: 2004-08-14T04:30:05+09:00 Subject: Re: timeouts with threads and SIGALRM Lennon Day-Reynolds wrote: > Eric, > > I realized that this probably should have been my first suggestion: > how about using the standard 'timeout' module to accomplish the same > thing? > > Ex: > > require 'timeout' > > begin > timeout(TIMELIMIT) do > my_sometimes_too_long_method() > end > rescue Timeout::Error > # Handle timeout here main_thread.raise WhateverException > end This addition lets you handle the exception in your main thread.