Skip to content

Commit

Permalink
Merge pull request #440 from jeremyevans/move-require-set
Browse files Browse the repository at this point in the history
Eagerly require set in thread_pool.rb
  • Loading branch information
hsbt committed Jul 20, 2022
2 parents 2cda976 + 4d3b5d7 commit 84bb052
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rake/thread_pool.rb
@@ -1,6 +1,7 @@
# frozen_string_literal: true

require "rake/promise"
require "set"

module Rake

Expand All @@ -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
Expand Down

0 comments on commit 84bb052

Please sign in to comment.