right_chimp 1.0.2 → 1.0.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5df5e7af3e88a247df0ca5f855360b6d81316b17
4
- data.tar.gz: 45a3a90419e7f4bc8f036853f913abcfd677d6a2
3
+ metadata.gz: 1562feef06b0bcc0b1c87bd55c8421abafd7ca26
4
+ data.tar.gz: 724add71f798b34e6a4a4e37e2611c90d60e44b0
5
5
  SHA512:
6
- metadata.gz: c1a9b9120dd6b2df5e2fb87e3b10c4a942bd2c987ae300b9a5f8f8500b12fb5030b665c1e83ae6cbb6b04b7c992176ad23a656f0dcb0274ab501752903b6b76d
7
- data.tar.gz: 4fd99523738ac5a9b2f57ed65b581a74f17e1ed716cd54f0215a3d05fa9e38ebedc007269d5a2b8deebdbe84cb9b85ac4ad18977c755b5f7bac1484ea9e631fe
6
+ metadata.gz: 5aee4d9a399b1a0b7dc99b0b05640bb372ced0015a54f61caff3f9e7b0ab01186be690d94ffa5a0c1eaeb4fa2e8f5f07c68ddb547561630cfe4a5d15953c21bb
7
+ data.tar.gz: 6d1ec02570a46c928512df6b0387759faad9a15b7774d4ed408a5fd14f693da8d1d5af97cbe8fc5d35eb5d052062d689ea60963f2d664979a4fdea3b50f3da58
data/CHANGES CHANGED
@@ -96,5 +96,8 @@ Version 1.0.1
96
96
 
97
97
  Version 1.0.2
98
98
  -------------
99
- * Add support for specifying inputs on the command line when working with arrays
99
+ * Feature: Add support for specifying inputs on the command line when working with arrays
100
100
 
101
+ Version 1.0.3
102
+ -------------
103
+ * Bugfix: fix race condition in chimpd serial groups
@@ -14,7 +14,7 @@ module Chimp
14
14
  @max_threads = 10
15
15
  @workers_never_exit = true
16
16
  @threads = []
17
-
17
+ @semaphore = Mutex.new
18
18
  self.reset!
19
19
  end
20
20
 
@@ -54,7 +54,6 @@ module Chimp
54
54
  end
55
55
 
56
56
  def create_group(name, type = :parallel, concurrency = 1)
57
- type = :parallel
58
57
  Log.debug "Creating new execution group #{name} type=#{type} concurrency=#{concurrency}"
59
58
  new_group = ExecutionGroupFactory.from_type(type)
60
59
  new_group.group_id = name
@@ -67,12 +66,14 @@ module Chimp
67
66
  #
68
67
  def shift
69
68
  r = nil
70
- @group.values.each do |group|
71
- if group.ready?
72
- r = group.shift
73
- break
74
- end
75
- end
69
+ @semaphore.synchronize do
70
+ @group.values.each do |group|
71
+ if group.ready?
72
+ r = group.shift
73
+ break
74
+ end
75
+ end
76
+ end
76
77
  return(r)
77
78
  end
78
79
 
@@ -273,5 +273,4 @@ module Chimp
273
273
  "P"
274
274
  end
275
275
  end
276
-
277
- end
276
+ end
@@ -1,3 +1,3 @@
1
1
  module Chimp
2
- VERSION = "1.0.2"
2
+ VERSION = "1.0.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: right_chimp
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christopher Deutsch
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-05-09 00:00:00.000000000 Z
11
+ date: 2013-06-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: progressbar