-
Notifications
You must be signed in to change notification settings - Fork 760
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
Add UV_CONCURRENT_INSTALLS
variable in favor of RAYON_NUM_THREADS
#3646
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,13 +11,18 @@ pub struct Concurrency { | |
/// | ||
/// Note this value must be non-zero. | ||
pub builds: usize, | ||
/// The maximum number of concurrent installs. | ||
/// | ||
/// Note this value must be non-zero. | ||
pub installs: usize, | ||
} | ||
|
||
impl Default for Concurrency { | ||
fn default() -> Self { | ||
Concurrency { | ||
downloads: Concurrency::DEFAULT_DOWNLOADS, | ||
builds: Concurrency::default_builds(), | ||
builds: Concurrency::threads(), | ||
installs: Concurrency::threads(), | ||
} | ||
} | ||
} | ||
|
@@ -26,8 +31,8 @@ impl Concurrency { | |
// The default concurrent downloads limit. | ||
pub const DEFAULT_DOWNLOADS: usize = 50; | ||
|
||
// The default concurrent builds limit. | ||
pub fn default_builds() -> usize { | ||
// The default concurrent builds and install limit. | ||
pub fn threads() -> usize { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just confirming that this is the same as the Rayon default? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
std::thread::available_parallelism() | ||
.map(NonZeroUsize::get) | ||
.unwrap_or(1) | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this no longer have any effect? (If it still has an effect, we should leave it here, even if
UV_CONCURRENT_INSTALLS
is recommended, since this is intended to document env variables that could affect behavior.)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It shouldn't have any effect because we're initialize the global thread pool manually.