Skip to content

Commit

Permalink
Merge pull request #374 from deivid-rodriguez/lazily_load_set
Browse files Browse the repository at this point in the history
Lazily load `set`
  • Loading branch information
hsbt committed Apr 23, 2021
2 parents c591402 + cf8b376 commit a842fb2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rake/thread_pool.rb
@@ -1,5 +1,4 @@
# frozen_string_literal: true
require "set"

require "rake/promise"

Expand All @@ -10,6 +9,7 @@ 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 a842fb2

Please sign in to comment.