From e5c4125c348104444714b5111c90016d520461d6 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 21 Apr 2011 21:22:06 +0000 Subject: thread_timeout: document Thread.pass usage Thread-switching sometimes takes too long under YARV, so we force a switch since the watchdog thread is lower-priority. --- lib/rainbows/thread_timeout.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/rainbows') diff --git a/lib/rainbows/thread_timeout.rb b/lib/rainbows/thread_timeout.rb index 44baf9a..3d28daf 100644 --- a/lib/rainbows/thread_timeout.rb +++ b/lib/rainbows/thread_timeout.rb @@ -93,7 +93,7 @@ class Rainbows::ThreadTimeout sleep(@timeout) else sec = next_expiry - Time.now - sec > 0.0 ? sleep(sec) : Thread.pass + sec > 0.0 ? sleep(sec) : Thread.pass # give other threads a chance end rescue => e logger.error e -- cgit v1.2.3-24-ge0c7