e-threadpool 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -31,6 +31,8 @@ threadpool = Threadpool::Threadpool.new
31
31
  100.times.each do
32
32
  # threadpool auto-executes the job after loaded
33
33
  threadpool.load(TestJob.new)
34
+ # Sleep 10ms, prevent ouput too fast on console.
35
+ sleep(0.01)
34
36
  end
35
37
 
36
38
  # shutdown will wait until all jobs are finished
data/lib/threadpool.rb CHANGED
@@ -3,4 +3,4 @@ $: << File.dirname(__FILE__)
3
3
  require 'threadpool/worker'
4
4
  require 'threadpool/core'
5
5
  require 'threadpool/job'
6
- include Threadpool
6
+ include Ethreadpool
@@ -1,6 +1,6 @@
1
1
  require "monitor"
2
2
 
3
- module Threadpool
3
+ module Ethreadpool
4
4
 
5
5
  class Threadpool
6
6
  INIT_WORKERS = 10
@@ -1,4 +1,4 @@
1
- module Threadpool
1
+ module Ethreadpool
2
2
 
3
3
  class Job
4
4
  attr_reader :jobid
@@ -15,6 +15,6 @@ module Threadpool
15
15
  def cancel
16
16
  Thread.current.exit
17
17
  end
18
-
18
+
19
19
  end
20
20
  end
@@ -1,4 +1,4 @@
1
- module Threadpool
1
+ module Ethreadpool
2
2
 
3
3
  class Worker
4
4
  attr_reader :start_time
@@ -34,6 +34,6 @@ module Threadpool
34
34
  @job = nil
35
35
  @start_time = nil
36
36
  end
37
-
37
+
38
38
  end
39
39
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: e-threadpool
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: