threadpuddle 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/threadpuddle.rb +3 -3
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 88a3409088076ee968a4af551e72c1c5d769ce0f
4
- data.tar.gz: dab7980497489aeeed8f5d022974e31150e2ddc7
3
+ metadata.gz: 269beb85fcb74159c1858a1dcec11d97b3b83195
4
+ data.tar.gz: 74cdbf0130525d434fb45ba9dcc596f2b84ce3ca
5
5
  SHA512:
6
- metadata.gz: b7475f7a25dfaf771bb2af4b3f47ef3168f927b368f2b580103bd7f09e63831f630cd4d2974a3f06e778fca9cd532a4b1353bc952aaed2e1df0109c8baf8a40a
7
- data.tar.gz: 95a9d46bd9aa611b5f4533243a248b68dba7ee853d0d03167cf72d09ca399933f06e1e2e26d656f5fcdf0e23a3a01ba80be2779d5849881ddeb2fbc9fcb91135
6
+ metadata.gz: be373d8b0c50e0598e5fc245b969054f6c67d0ecdd977d225a1fa7fa459593b6acdffb97ee2a1bb42b5ce6311a6199f2c38a3100441e54219aec5e2ebb83377d
7
+ data.tar.gz: a8118a8d59dbcbfea7a88a4d064bd14b833073a2c9f71202880d945fdd0272c1507636f26cb6cca235d751d07f2229034743296069266a65b6286402d659e175
@@ -2,7 +2,7 @@
2
2
  # Like a smaller, lamer thread pool.
3
3
  #
4
4
  class ThreadPuddle
5
- def initialize capacity=10
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
- # Current size of the puddle.
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: threadpuddle
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthew Kerwin