about summary refs log tree commit homepage
path: root/lib/dtas/buffer/splice.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/dtas/buffer/splice.rb')
-rw-r--r--lib/dtas/buffer/splice.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/dtas/buffer/splice.rb b/lib/dtas/buffer/splice.rb
index 9093860..2a7e9a4 100644
--- a/lib/dtas/buffer/splice.rb
+++ b/lib/dtas/buffer/splice.rb
@@ -69,7 +69,9 @@ module DTAS::Buffer::Splice # :nodoc:
   end
 
   def broadcast_inf(targets)
-    if targets.none?(&:nonblock?)
+    if targets.all?(&:ready_write_optimized?)
+      blocked = []
+    elsif targets.none?(&:nonblock?)
       # if all targets are blocking, don't start until they're all writable
       r = IO.select(nil, targets, nil, 0) or return targets
       blocked = targets - r[1]