lib/rbbt/util/misc/development.rb in rbbt-util-5.18.1 vs lib/rbbt/util/misc/development.rb in rbbt-util-5.19.0
- old
+ new
@@ -296,11 +296,10 @@
else
raise "Parameter 'num' not understood: #{Misc.fingerprint num}"
end
- #options = Misc.add_defaults options, :respawn => true, :cpus => cpus, :into => Set.new
options = Misc.add_defaults options, :respawn => true, :cpus => cpus
options = Misc.add_defaults options, :bar => "Bootstrap in #{ options[:cpus] } cpus: #{ Misc.fingerprint Annotated.purge(elems) }"
respawn = options[:respawn] and options[:cpus] and options[:cpus].to_i > 1
index = (0..elems.length-1).to_a.collect{|v| v.to_s }
@@ -309,9 +308,10 @@
elems.annotate elem if elems.respond_to? :annotate
begin
res = yield elem
rescue Interrupt
Log.warn "Process #{Process.pid} was aborted"
+ raise $!
end
res = nil unless options[:into]
raise RbbtProcessQueue::RbbtProcessQueueWorker::Respawn, res if respawn == :always and cpus > 1
res
end