Project

workaholic

0.0
No commit activity in last 3 years
No release in over 3 years
Parallel job runner
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.8.3
~> 3.12
~> 2.8.0
~> 0.7
 Project Readme

workaholic¶ ↑

Parallel job runner.

sample code¶ ↑

require 'rubygems'
require 'workaholic'

class TestJob < Workaholic::Job
  attr_reader :count
  def initialize; @count = 0  end
  def run;        @count += 1 end
end

worker = Workaholic.new
job    = TestJob.new

worker.start 100 do # 100 threads
  1000.times do
    worker.push job
  end
end

p job.count # => 1000

Copyright © 2012 mewlist. See LICENSE.txt for further details.