From: Nobuyoshi Nakada Date: 2008-03-10T13:38:31+09:00 Subject: Re: [RFC] TimeoutError in core, timeouts for ConditionVariable#wait Hi, At Sun, 9 Mar 2008 12:13:39 +0900, MenTaLguY wrote in [ruby-core:15835]: > 1. I added a second optional argument to ConditionVariable#wait which > specifies a timeout in seconds. If no second argument is provided, > #wait will wait indefinitely, as it did before. If a specified timeout > elapses before the waiting thread is signaled, #wait raises > TimeoutError. Timeouts <= 0 raise TimeoutError immediately. Sounds nice. > 2. To support this without introducing a new dependency on timeout.rb > (Timeout itself is not used), I moved TimeoutException into core; > Timeout::Error is now a constant set to TimeoutException, rather than > the other way around. I'm not sure if it is reasonable to implement it without timeout.rb. -- Nobu Nakada