threadpuddle 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/threadpuddle.rb +3 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 269beb85fcb74159c1858a1dcec11d97b3b83195
|
4
|
+
data.tar.gz: 74cdbf0130525d434fb45ba9dcc596f2b84ce3ca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: be373d8b0c50e0598e5fc245b969054f6c67d0ecdd977d225a1fa7fa459593b6acdffb97ee2a1bb42b5ce6311a6199f2c38a3100441e54219aec5e2ebb83377d
|
7
|
+
data.tar.gz: a8118a8d59dbcbfea7a88a4d064bd14b833073a2c9f71202880d945fdd0272c1507636f26cb6cca235d751d07f2229034743296069266a65b6286402d659e175
|
data/lib/threadpuddle.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
# Like a smaller, lamer thread pool.
|
3
3
|
#
|
4
4
|
class ThreadPuddle
|
5
|
-
def initialize capacity
|
5
|
+
def initialize capacity
|
6
6
|
@capacity = capacity
|
7
7
|
@threads = []
|
8
8
|
end
|
@@ -25,7 +25,7 @@ class ThreadPuddle
|
|
25
25
|
end
|
26
26
|
|
27
27
|
#
|
28
|
-
#
|
28
|
+
# Number of threads currently occupying the puddle.
|
29
29
|
#
|
30
30
|
def size
|
31
31
|
sweep
|
@@ -40,7 +40,7 @@ class ThreadPuddle
|
|
40
40
|
# @see ThreadPuddle#block
|
41
41
|
# @return the new Thread object
|
42
42
|
#
|
43
|
-
def spawn *args, &blk
|
43
|
+
def spawn *args, &blk #:yields: *args
|
44
44
|
# wait for a slot to open
|
45
45
|
block
|
46
46
|
# add the new thread
|