Sha256: 5bd26a4abdc884e4d02fe29aa66887a29d5943074fc342045ede06ee57fc2c1e
Contents?: true
Size: 582 Bytes
Versions: 13
Compression:
Stored size: 582 Bytes
Contents
module Couchbase module Async class Queue def initialize(bucket) @bucket = bucket @futures = [] end def add_future(future, options, &block) @futures << [ future, options, block ] end def join while future = @futures.pop begin future, options, callback = future future.get result = Couchbase::Result.new({ bucket: @bucket, future: future }.merge(options)) callback.call(result) unless callback.nil? end end end end end end
Version data entries
13 entries across 13 versions & 1 rubygems