bundler/lib/bundler/worker.rb in rubygems-update-2.6.14 vs bundler/lib/bundler/worker.rb in rubygems-update-2.7.0

- old
+ new

@@ -1,6 +1,7 @@ # frozen_string_literal: true + require "thread" module Bundler class Worker POISON = Object.new @@ -25,11 +26,11 @@ @request_queue = Queue.new @response_queue = Queue.new @func = func @size = size @threads = nil - trap("INT") { abort_threads } + SharedHelpers.trap("INT") { abort_threads } end # Enqueue a request to be executed in the worker pool # # @param obj [String] mostly it is name of spec that should be downloaded @@ -74,9 +75,10 @@ @threads = nil end def abort_threads return unless @threads + Bundler.ui.debug("\n#{caller.join("\n")}") @threads.each(&:exit) exit 1 end def create_threads