diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-10-11 02:20:45 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-10-11 02:20:45 -0700 |
commit | 89d5aa6894af87e055c118dc68bff340547abf5b (patch) | |
tree | 1c927f0ae8d0de25fe376ccca5163a5ebd847fd3 | |
parent | 36869925dbd73533a5b71ab0dfe838b371f420e1 (diff) | |
download | rainbows-89d5aa6894af87e055c118dc68bff340547abf5b.tar.gz |
In Unicorn by HttpServer#init_worker_process
-rw-r--r-- | lib/rainbows/thread_pool.rb | 4 | ||||
-rw-r--r-- | lib/rainbows/thread_spawn.rb | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/rainbows/thread_pool.rb b/lib/rainbows/thread_pool.rb index 033452c..c26f47b 100644 --- a/lib/rainbows/thread_pool.rb +++ b/lib/rainbows/thread_pool.rb @@ -28,7 +28,7 @@ module Rainbows maintain_thread_count(threads) threads.list.each do |thr| alive.chmod(m = 0 == m ? 1 : 0) - thr.join(timeout / 2.0) and break + thr.join(timeout) and break end end join_worker_threads(threads) @@ -62,7 +62,7 @@ module Rainbows begin ret = begin Thread.current[:t] = Time.now - IO.select(LISTENERS, nil, nil, timeout/2.0) or next + IO.select(LISTENERS, nil, nil, timeout) or next rescue Errno::EINTR retry rescue Errno::EBADF, TypeError diff --git a/lib/rainbows/thread_spawn.rb b/lib/rainbows/thread_spawn.rb index ef5d3db..c9fd23c 100644 --- a/lib/rainbows/thread_spawn.rb +++ b/lib/rainbows/thread_spawn.rb @@ -23,7 +23,7 @@ module Rainbows begin ret = begin alive.chmod(m = 0 == m ? 1 : 0) - IO.select(LISTENERS, nil, nil, timeout/2.0) or next + IO.select(LISTENERS, nil, nil, timeout) or next rescue Errno::EINTR retry rescue Errno::EBADF, TypeError |