bundler/lib/bundler/worker.rb in rubygems-update-3.3.27 vs bundler/lib/bundler/worker.rb in rubygems-update-3.4.0
- old
+ new
@@ -85,17 +85,15 @@
def create_threads
creation_errors = []
@threads = Array.new(@size) do |i|
- begin
- Thread.start { process_queue(i) }.tap do |thread|
- thread.name = "#{name} Worker ##{i}" if thread.respond_to?(:name=)
- end
- rescue ThreadError => e
- creation_errors << e
- nil
+ Thread.start { process_queue(i) }.tap do |thread|
+ thread.name = "#{name} Worker ##{i}" if thread.respond_to?(:name=)
end
+ rescue ThreadError => e
+ creation_errors << e
+ nil
end.compact
add_interrupt_handler unless @threads.empty?
return if creation_errors.empty?