lib/bundler/worker.rb in bundler-2.0.2 vs lib/bundler/worker.rb in bundler-2.1.0.pre.1
- old
+ new
@@ -1,9 +1,7 @@
# frozen_string_literal: true
-require "thread"
-
module Bundler
class Worker
POISON = Object.new
class WrappedException < StandardError
@@ -60,10 +58,10 @@
end
end
def apply_func(obj, i)
@func.call(obj, i)
- rescue Exception => e
+ rescue Exception => e # rubocop:disable Lint/RescueException
WrappedException.new(e)
end
# Stop the worker threads by sending a poison object down the request queue
# so as worker threads after retrieving it, shut themselves down