Sha256: 007d54c577f5e6b05e18c61f39482979429dc346a0658ed1cc7e4a8faf25a758
Contents?: true
Size: 826 Bytes
Versions: 5
Compression:
Stored size: 826 Bytes
Contents
require 'thread' require 'set' require 'workers/version' require 'workers/helpers' require 'workers/worker' require 'workers/pool' require 'workers/event' require 'workers/log_proxy' require 'workers/scheduler' require 'workers/timer' require 'workers/periodic_timer' require 'workers/task' require 'workers/task_group' module Workers def self.pool return @pool ||= Workers::Pool.new end def self.pool=(val) @pool.dispose if @pool @pool = val end def self.scheduler return @scheduler ||= Workers::Scheduler.new end def self.scheduler=(val) @scheduler.dispose if @scheduler @scheduler = val end def self.map(vals, &block) return Workers::TaskGroup.new.map(vals) do |v| block.call(v) end end end # Force initialization of defaults. Workers.pool Workers.scheduler
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
workers-0.1.3 | lib/workers.rb |
workers-0.1.2 | lib/workers.rb |
workers-0.1.1 | lib/workers.rb |
workers-0.1.0 | lib/workers.rb |
workers-0.0.9 | lib/workers.rb |