Sha256: dc3c3312c59b9a30a37b7de38d5e751a00b9756bff333846f8608de5b0fdbcfa
Contents?: true
Size: 378 Bytes
Versions: 1
Compression:
Stored size: 378 Bytes
Contents
require 'thread' class Proco module Queue # @private class MultiQueue < Proco::Queue::Base def initialize size, delay super @future = Future.new end def push_impl item @items << item @future end def take_impl items = @items ret = [@future, items] # Reset vars @items = [] @future = Future.new ret end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
proco-0.0.2 | lib/proco/queue/multi_queue.rb |