Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Threaded processor with specifiable thread pool size.
Ruby
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
.gitignore
LICENSE
Rakefile
readme.rdoc
threaded_processor.gemspec

readme.rdoc

ThreadedProcessor : A very simple wrapper for sized queue multithreading with Ruby

Usage

object_list = %w(1..100).to_a
threads = 5
tp = ThreadedProcessor.new(object_list,threads) do |obj|
  puts obj
end
tp.run!

OR

tp = ThreadedProcessor.new
tp.list = [1,2,3]
tp << 4
tp << 5
tp.block = Proc.new{|x| puts x}
tp.max_threads = 5
tp.run!

Building

rake build

License

(c)2010 Patrick Morgan under MIT License
patrick@patrick-morgan.net
http://www.patrick-morgan.net
Something went wrong with that request. Please try again.