Project

lone_wolf

0.0
Repository is archived
No commit activity in last 3 years
No release in over 3 years
Background worker process API
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.16
~> 10.0
~> 3.0

Runtime

~> 1.0.0
 Project Readme

Lone Wolf

Background worker process API

Installation

$ gem install lone_wolf

Usage

# a simple job
work = Proc.new { |var| print "Hello #{var}!" }

# start a background process to do the job in a loop forever
worker = LoneWolf::Worker.new(job: work, loop: true, start: true)

# send work to the worker
["Kent", "Chuck", "Sam", "Brian"].each do |name|
  worker.input.write name
end

# kill the worker 
worker.kill!

License

The gem is available as open source under the terms of the MIT License.