thread 0.0.8 → 0.0.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/thread/pool.rb +7 -3
- data/thread.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4d257856d0bf60a4515f3512f44e1ca7f72ac22c
|
4
|
+
data.tar.gz: 99094a0eff5d5e031230d872a67f30730d025730
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dbe9b316f2bdd6b3c141180de8be77bd8a62ffa2ddfee531a6f63bc39bcc3b0ca263688037549c6b3c479a55f4ab710112871da4ed3f4e7070fd8eab6e8ee622
|
7
|
+
data.tar.gz: ac27c137c50fdc797ca56a0ebf6d2578634dcc86d007959fc3f55bf2ad0ba5f2d4715c04e1bb9de3f3134cab47efb18091e7571bdb661c049cf90ecd934d1521
|
data/lib/thread/pool.rb
CHANGED
@@ -249,7 +249,11 @@ class Thread::Pool
|
|
249
249
|
|
250
250
|
# Join on all threads in the pool.
|
251
251
|
def join
|
252
|
-
|
252
|
+
until @workers.empty?
|
253
|
+
if worker = @workers.first
|
254
|
+
worker.join
|
255
|
+
end
|
256
|
+
end
|
253
257
|
|
254
258
|
self
|
255
259
|
end
|
@@ -304,9 +308,9 @@ private
|
|
304
308
|
@waiting += 1
|
305
309
|
@cond.wait @mutex
|
306
310
|
@waiting -= 1
|
311
|
+
end
|
307
312
|
|
308
|
-
|
309
|
-
end or break
|
313
|
+
break if @todo.empty? && shutdown?
|
310
314
|
end
|
311
315
|
|
312
316
|
@todo.shift
|
data/thread.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: thread
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.8
|
4
|
+
version: 0.0.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- meh.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-05-
|
11
|
+
date: 2013-05-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|