about summary refs log tree commit homepage
path: root/lib/dtas/buffer.rb
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2013-10-06 11:02:38 +0000
committerEric Wong <normalperson@yhbt.net>2013-10-06 11:19:02 +0000
commit019543aa3a1074582a460b944ad5ebcddecd4394 (patch)
treebb24e015b373c5b9daca04e3497230058c8bcdf7 /lib/dtas/buffer.rb
parentb991345ff960229347b32eb1bfe9d7732441c19e (diff)
downloaddtas-019543aa3a1074582a460b944ad5ebcddecd4394.tar.gz
We do not need this for single sink situations (the common case)
at all.  We also do not need to check IO#nread for splice, either;
we can just do non-blocking I/O.  The only common path where we
might still need it is the non-splice case with multiple sinks.
Diffstat (limited to 'lib/dtas/buffer.rb')
-rw-r--r--lib/dtas/buffer.rb7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/dtas/buffer.rb b/lib/dtas/buffer.rb
index c9f096c..c0ba6a6 100644
--- a/lib/dtas/buffer.rb
+++ b/lib/dtas/buffer.rb
@@ -47,16 +47,13 @@ class DTAS::Buffer # :nodoc:
   # - some type of StandardError
   # - nil
   def broadcast(targets)
-    bytes = inflight
-    return :wait_readable if 0 == bytes # spurious wakeup
-
     case targets.size
     when 0
       :ignore # this will pause decoders
     when 1
-      broadcast_one(targets, bytes)
+      broadcast_one(targets)
     else # infinity
-      broadcast_inf(targets, bytes)
+      broadcast_inf(targets)
     end
   end