threaded_processor 0.1 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/threaded_processor.rb +23 -1
  2. metadata +1 -1
@@ -1,4 +1,26 @@
1
- VERSION = 0.1
1
+ # ThreadedProcessor : A very simple wrapper for sized queue multithreading with Ruby
2
+ #
3
+ # = Usage
4
+ #
5
+ # object_list = %w(1..100).to_a
6
+ # threads = 5
7
+ # tp = ThreadedProcessor.new(object_list,threads) do |obj|
8
+ # puts obj
9
+ # end
10
+ # tp.run!
11
+ #
12
+ # OR
13
+ #
14
+ # tp = ThreadedProcessor.new
15
+ # tp.list = [1,2,3]
16
+ # tp << 4
17
+ # tp << 5
18
+ # tp.block = Proc.new{|x| puts x}
19
+ # tp.max_threads = 5
20
+ # tp.run!
21
+
22
+
23
+ VERSION = "0.1.1"
2
24
 
3
25
  require 'thread'
4
26
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: threaded_processor
3
3
  version: !ruby/object:Gem::Version
4
- version: "0.1"
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Patrick Morgan