Permalink
Browse files

Trying to find a simple way to get all channels to close...

  • Loading branch information...
1 parent 330ff36 commit ba505258fd9ffd728d6fbc80653acab7fc00b37a Darrick Wiebe committed Mar 31, 2011
Showing with 5 additions and 0 deletions.
  1. +5 −0 lib/pacer/pipes/channel_pipe.rb
@@ -9,6 +9,11 @@ def initialize(channel, timeout = nil)
value = channel.receive
if channel == value
channel.close rescue nil
+ if channel.receive?
+ channel << value
+ else
+ channel.close rescue nil
+ end
raise StopIteration
else
value

0 comments on commit ba50525

Please sign in to comment.