Pre-initialize global rayon threadpool (#41226)
We only use it a handful of times and the default amount of threads (logical cpu core number) its spawns is overkill for this. This also gives the threads names oppose to being labeled `<unknown>` Release Notes: - N/A *or* Added/Fixed/Improved ...
This commit is contained in:
@@ -356,6 +356,12 @@ fn main() -> Result<()> {
|
||||
"Dev servers were removed in v0.157.x please upgrade to SSH remoting: https://zed.dev/docs/remote-development"
|
||||
);
|
||||
|
||||
rayon::ThreadPoolBuilder::new()
|
||||
.num_threads(4)
|
||||
.thread_name(|ix| format!("RayonWorker{}", ix))
|
||||
.build_global()
|
||||
.unwrap();
|
||||
|
||||
let sender: JoinHandle<anyhow::Result<()>> = thread::Builder::new()
|
||||
.name("CliReceiver".to_string())
|
||||
.spawn({
|
||||
|
||||
Reference in New Issue
Block a user