tubes 0.1.9 → 0.1.10
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/tubes.rb +6 -6
- metadata +1 -1
data/lib/tubes.rb
CHANGED
@@ -83,13 +83,13 @@ class Tube
|
|
83
83
|
self.puts "Skipping: #{step}"
|
84
84
|
output = JSON.load(File.read(output_file))["data"]
|
85
85
|
|
86
|
-
if
|
86
|
+
if serial?
|
87
|
+
@output = output
|
88
|
+
@input = output
|
89
|
+
elsif parallel?
|
87
90
|
@thread_lock.synchronize do
|
88
91
|
@output << output
|
89
92
|
end
|
90
|
-
elsif serial?
|
91
|
-
@output = output
|
92
|
-
@input = output
|
93
93
|
end
|
94
94
|
else
|
95
95
|
self.puts "Running: #{step}"
|
@@ -148,7 +148,7 @@ class Tube
|
|
148
148
|
tube.instance_eval &block
|
149
149
|
tube.threads.each { |thread| thread.join } # Could be a parallel block inside a parallel block.
|
150
150
|
@thread_lock.synchronize do
|
151
|
-
@output << mode == :parallel ? tube.output.flatten(1) : tube.output
|
151
|
+
@output << (mode == :parallel ? tube.output.flatten(1) : tube.output)
|
152
152
|
end
|
153
153
|
end
|
154
154
|
@threads << thread
|
@@ -156,7 +156,7 @@ class Tube
|
|
156
156
|
tube = child(mode, args)
|
157
157
|
tube.instance_eval &block
|
158
158
|
tube.threads.each { |thread| thread.join }
|
159
|
-
@output = mode == :parallel ? tube.output.flatten(1) : tube.output
|
159
|
+
@output = (mode == :parallel ? tube.output.flatten(1) : tube.output)
|
160
160
|
@input = @output
|
161
161
|
end
|
162
162
|
rescue => e
|