Skip to content

Commit 84bb052

Browse files
authored
Merge pull request #440 from jeremyevans/move-require-set
Eagerly require set in thread_pool.rb
2 parents 2cda976 + 4d3b5d7 commit 84bb052

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/rake/thread_pool.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# frozen_string_literal: true
22

33
require "rake/promise"
4+
require "set"
45

56
module Rake
67

@@ -9,7 +10,6 @@ class ThreadPool # :nodoc: all
910
# Creates a ThreadPool object. The +thread_count+ parameter is the size
1011
# of the pool.
1112
def initialize(thread_count)
12-
require "set"
1313
@max_active_threads = [thread_count, 0].max
1414
@threads = Set.new
1515
@threads_mon = Monitor.new

0 commit comments

Comments
 (0)