summaryrefslogtreecommitdiff
path: root/lib/bundler/worker.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bundler/worker.rb')
-rw-r--r--lib/bundler/worker.rb12
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/bundler/worker.rb b/lib/bundler/worker.rb
index 5e4ee21c51..3ebd6f01db 100644
--- a/lib/bundler/worker.rb
+++ b/lib/bundler/worker.rb
@@ -87,14 +87,12 @@ module Bundler
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?