123456789_123456789_123456789_123456789_123456789_

Module: Concurrent::Promises::FactoryMethods::OldChannelIntegration

Relationships & Source Files
Extension / Inclusion / Inheritance Descendants
Extended In:
Included In:
Defined in: lib/concurrent-ruby-edge/concurrent/edge/old_channel_integration.rb

Instance Method Summary

Instance Method Details

#select(*channels) ⇒ Future (private)

only proof of concept

[ GitHub ]

  
# File 'lib/concurrent-ruby-edge/concurrent/edge/old_channel_integration.rb', line 15

def select(*channels)
  # TODO (pitr-ch 26-Mar-2016): re-do, has to be non-blocking
  future do
    # noinspection RubyArgCount
    Channel.select do |s|
      channels.each do |ch|
        s.take(ch) { |value| [value, ch] }
      end
    end
  end
end