Sha256: 2d9dfc4206369951852e0965a0eaffb967c25aa60813fdf118287e9607b2fa79
Contents?: true
Size: 660 Bytes
Versions: 18
Compression:
Stored size: 660 Bytes
Contents
module Asynchronic class Environment attr_reader :queue_engine attr_reader :data_store def initialize(queue_engine, data_store) @queue_engine = queue_engine @data_store = data_store end def queue(name) queue_engine[name] end def default_queue queue(queue_engine.default_queue) end def enqueue(msg, queue=nil) queue(queue || queue_engine.default_queue).push msg end def create_process(type, params={}) Process.create self, type, params end def load_process(id) Process.new self, id end def processes Process.all self end end end
Version data entries
18 entries across 18 versions & 1 rubygems