Sha256: c7c3c41ef25642e99111d9f23ac0c4e1bb83c42d56ca8196f17a05d51dda42f2
Contents?: true
Size: 512 Bytes
Versions: 19
Compression:
Stored size: 512 Bytes
Contents
require 'concurrent/maybe' module Concurrent class Channel class Selector class PutClause def initialize(channel, message, block) @channel = channel @message = message @block = block end def execute if @channel.offer?(@message).just? result = @block ? @block.call : nil Concurrent::Maybe.just(result) else Concurrent::Maybe.nothing end end end end end end
Version data entries
19 entries across 19 versions & 1 rubygems