Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lazily load set #374

Merged
merged 1 commit into from Apr 23, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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"
deivid-rodriguez marked this conversation as resolved.
Show resolved Hide resolved
@max_active_threads = [thread_count, 0].max
@threads = Set.new
@threads_mon = Monitor.new
Expand Down