diff options
author | Eric Wong <normalperson@yhbt.net> | 2010-05-26 22:49:49 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2010-05-26 22:49:49 +0000 |
commit | 904526129a2377306a735c73b26699583b3b99c5 (patch) | |
tree | 6811262ca96fb3cf5defc1fefe7dfcc2e978409e /lib/rainbows | |
parent | 4ccaf0a931a0731d1dca2710b86864075eb511a1 (diff) | |
download | rainbows-904526129a2377306a735c73b26699583b3b99c5.tar.gz |
Diffstat (limited to 'lib/rainbows')
-rw-r--r-- | lib/rainbows/thread_spawn.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/rainbows/thread_spawn.rb b/lib/rainbows/thread_spawn.rb index 75cc150..9660fc0 100644 --- a/lib/rainbows/thread_spawn.rb +++ b/lib/rainbows/thread_spawn.rb @@ -33,6 +33,9 @@ module Rainbows # synchronization primitives for _every_ case, not just this # unlikely one. Since this case is (or should be) uncommon, # just busy wait when we have to. + # We don't use Thread.pass because it needlessly spins the + # CPU during I/O wait, CPU cycles that can be better used + # by other worker _processes_. sleep(0.01) elsif c = Rainbows.sync_accept(l) klass.new(c) do |c| |