esr-rim 1.3.8 → 1.3.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YTAzMzg0MDJmNmNiNDIzZDA5MWJiNDUwNTkyNWJlZmQ3M2Q2MzliMg==
4
+ YzMzYjRlMWZiZWE5YmFiMGYzMjI1YWEzODczMTU1N2I4YWIxYmVjOQ==
5
5
  data.tar.gz: !binary |-
6
- YjgwYzMzMWM3NGNiNWM5NWQxMGQ5MDYzZDg2NjRkMTI3N2VhMDBiYQ==
6
+ YTY4NGY4M2MwNTJmYTI0ZGUzMWY5N2IzNTliYTQ4YzNiNDhmMzdmZQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZjVhNzBkZWIyNWMyMjM3ZDJiZTI2MjY1NmVlODVhYjYwYmFhNTk5ZjVjMjJi
10
- NGJlMDViZGFmZDA0M2I1ZGNiM2VhN2NmMTY0ZmE0ODRmOTEyNzFiNjA1M2Y1
11
- ZGI2NjE5ZDQ5NDE5Y2M5NjE1ODM0N2UzZTNhZTAyNmM4MjcyMTQ=
9
+ MGY0YzQ3NjU2ODJhNTg0OTk0MmM4NTRjOGZhZmQxMTYxOGNkZWJhNDc0YzM2
10
+ OGIzOTFhMTAyZjYxNmJlZGQwYWYzMTY5NDBkMjY1MDYxZjVhYzUyMzEzMGU1
11
+ MmVkNjAzMjkyMjVlZTY5NGQ2OGQ2ZDViZDIzNGVhYmM3NzE5OGM=
12
12
  data.tar.gz: !binary |-
13
- NjRkMjg1Nzg1MDgzMjQxOGM2NTM1NzQ0ZDg1ZGE0NTk5NDM4MzFiMTIyZTg1
14
- ZjViMDg5YmE1NmNiMzRhNDcwMWRlNGE3Y2JlNTU3Y2M2YjhlMTAzNDUzZGM1
15
- NmNkY2ZhNTJmYjJkMjIzNDQ3ODk3NTE1MTkwZjdjYTdmZGYzYmI=
13
+ NjdmZjM2ODc4MWMwNTc1YTlmZGM2NjRlODg2NTI4MGNlOTFhYmU1NWRhZWYx
14
+ OWIyZTE5NmYyN2JhYjhhOGE2MmE5YWY1YjY0MGI2ZmEwOTkzN2QyZWQ3YjBk
15
+ ZjZiNTRjMmJkYjc4YWFjMWI1NWM1NTI1OWY2MzFmOTYzY2JlMTE=
data/CHANGELOG CHANGED
@@ -118,3 +118,7 @@
118
118
  # 1.3.8
119
119
 
120
120
  * Normalize also path set in HOME before using (fixes problems with backslash used in Windows).
121
+
122
+ # 1.3.9
123
+
124
+ * Changed handling of parallel tasks due to robustness problems
@@ -109,36 +109,33 @@ end
109
109
  def each_module_parallel(task_desc, modules)
110
110
  if !modules.empty?
111
111
  @logger.debug "starting \"#{task_desc}\" for #{modules.size} modules\r"
112
- threads = []
113
- messages = []
114
- i = 0
115
- done = 0
116
- while i == 0 || !threads.empty?
117
- while threads.size < MaxThreads && i < modules.size
118
- threads << Thread.new(i) do |i|
112
+ index_queue = Queue.new
113
+ (0...modules.size).each do |i|
114
+ index_queue << i
115
+ end
116
+ result_queue = Queue.new
117
+ (1..MaxThreads).each do
118
+ Thread.new do
119
+ loop do
120
+ i = index_queue.pop(true)
121
+ break if i.nil?
122
+ result = []
119
123
  begin
120
124
  yield(modules[i], i)
121
125
  rescue RimException => e
122
- messages += e.messages
126
+ result = e.messages
127
+ rescue Exception => e
128
+ result = [e.to_s]
123
129
  end
130
+ result_queue << result
124
131
  end
125
- i += 1
126
132
  end
127
- sleep(0.1)
128
- threads = threads.select{|t|
129
- if t.alive?
130
- true
131
- else
132
- t.join
133
- done += 1
134
- @logger.debug "#{task_desc} #{done}/#{modules.size}\r"
135
- false
136
- end
137
- }
138
133
  end
139
- if !messages.empty?
140
- raise RimException.new(messages)
134
+ messages = []
135
+ (0...modules.size).each do |i|
136
+ messages.concat(result_queue.pop)
141
137
  end
138
+ raise RimException.new(messages) if !messages.empty?
142
139
  end
143
140
  end
144
141
 
@@ -2,7 +2,7 @@ module RIM
2
2
 
3
3
  module Version
4
4
 
5
- Version = "1.3.8"
5
+ Version = "1.3.9"
6
6
 
7
7
  end
8
8
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: esr-rim
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.8
4
+ version: 1.3.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - ESR Labs AG
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-04 00:00:00.000000000 Z
11
+ date: 2017-01-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: subcommand
@@ -83,9 +83,6 @@ files:
83
83
  - test/test_helper.rb
84
84
  - test/unit_tests.rb
85
85
  - test/upload_helper_test.rb
86
- - test/upload_helper_test/remote_git/mod1/readme.txt
87
- - test/upload_helper_test/remote_ws/readme
88
- - test/upload_helper_test/ws/readme
89
86
  - test/upload_module_helper_test.rb
90
87
  homepage: http://github.com/esrlabs/esr-rim
91
88
  licenses: []
@@ -1 +0,0 @@
1
- Content
@@ -1 +0,0 @@
1
- Content