diff --git a/lib/rake/thread_pool.rb b/lib/rake/thread_pool.rb index 332956670..76aa3b74b 100644 --- a/lib/rake/thread_pool.rb +++ b/lib/rake/thread_pool.rb @@ -1,6 +1,7 @@ # frozen_string_literal: true require "rake/promise" +require "set" module Rake @@ -9,7 +10,6 @@ class ThreadPool # :nodoc: all # Creates a ThreadPool object. The +thread_count+ parameter is the size # of the pool. def initialize(thread_count) - require "set" @max_active_threads = [thread_count, 0].max @threads = Set.new @threads_mon = Monitor.new