pipa-threadpool 0.2.2 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. data/README.rdoc +1 -1
  2. data/lib/threadpool.rb +4 -4
  3. metadata +2 -2
data/README.rdoc CHANGED
@@ -2,7 +2,7 @@
2
2
  O HAI! My name is Pool, Thread Pool. Now in Ruby.
3
3
 
4
4
  === Installation
5
- gem install pipa-threadpool -s http://gems.github.com
5
+ gem install pipa-threadpool --source http://gems.github.com
6
6
 
7
7
  === Usage
8
8
  pool = ThreadPool.new
data/lib/threadpool.rb CHANGED
@@ -79,11 +79,11 @@ class ThreadPool
79
79
  end if block_given?
80
80
  end
81
81
 
82
- # live? => boolean
82
+ # alive? => boolean
83
83
  #
84
84
  # Pool is live when it's not dead.
85
85
  # Pool is dead when it's closed.
86
- def live?
86
+ def alive?
87
87
  synchronize { !@dead }
88
88
  end
89
89
 
@@ -111,7 +111,7 @@ class ThreadPool
111
111
  #
112
112
  # === Example:
113
113
  # puts 'zomg' unless pool.try_run('go to hell') {|greeting| puts greeting }
114
- def try_run(*args, &block)
114
+ def run?(*args, &block)
115
115
  run_core(false, *args, &block)
116
116
  end
117
117
 
@@ -185,7 +185,7 @@ class ThreadPool
185
185
  job.run rescue nil
186
186
  end
187
187
  ensure
188
- synchronize { @workers.delete(Thread.current) }
188
+ synchronize { @workers.delete(Thread.current) unless @dead }
189
189
  end
190
190
  end
191
191
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pipa-threadpool
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Igor Gunko
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-06-10 00:00:00 -07:00
12
+ date: 2009-06-12 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies: []
15
15