Module: Concurrent::Promises::Future::OldChannelIntegration
Relationships & Source Files | |
Extension / Inclusion / Inheritance Descendants | |
Included In:
| |
Defined in: | lib/concurrent-ruby-edge/concurrent/edge/old_channel_integration.rb |
Instance Method Summary
- #then_put(channel) private
-
#then_select(*channels) ⇒ Future
private
Zips with selected value form the suplied channels.
Instance Method Details
#then_put(channel) (private)
Note:
may block
Note:
only proof of concept
# File 'lib/concurrent-ruby-edge/concurrent/edge/old_channel_integration.rb', line 48
def then_put(channel) on_fulfillment_using(:io, channel) { |value, channel| channel.put value } end
#then_select(*channels) ⇒ Future (private)
Zips with selected value form the suplied channels
# File 'lib/concurrent-ruby-edge/concurrent/edge/old_channel_integration.rb', line 41
def then_select(*channels) future = Concurrent::Promises.select(*channels) ZipFuturesPromise.new_blocked_by2(self, future, @DefaultExecutor).future end