diff options
author | Eric Wong <normalperson@yhbt.net> | 2011-03-20 03:07:31 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2011-03-20 03:07:31 +0000 |
commit | c7e75cfe241a621f50c750720c47149a156e8e7f (patch) | |
tree | fc00265a91e54cd14af77da683235ecc0a865185 /lib/rainbows/thread_spawn.rb | |
parent | d327a0d468e5b5cfb05bb56621fb22d156ce3a40 (diff) | |
download | rainbows-c7e75cfe241a621f50c750720c47149a156e8e7f.tar.gz |
Run under 1.9.3dev
Diffstat (limited to 'lib/rainbows/thread_spawn.rb')
-rw-r--r-- | lib/rainbows/thread_spawn.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/rainbows/thread_spawn.rb b/lib/rainbows/thread_spawn.rb index 281e223..30e143e 100644 --- a/lib/rainbows/thread_spawn.rb +++ b/lib/rainbows/thread_spawn.rb @@ -24,12 +24,12 @@ module Rainbows::ThreadSpawn limit = worker_connections nr = 0 LISTENERS.each do |l| - klass.new(l) do |l| + klass.new do begin if lock.synchronize { nr >= limit } worker_yield - elsif c = l.kgio_accept - klass.new(c) do |c| + elsif client = l.kgio_accept + klass.new(client) do |c| begin lock.synchronize { nr += 1 } c.process_loop |