Skip to content
Snippets Groups Projects
Commit 077cd3ab authored by jackliu's avatar jackliu :disappointed:
Browse files

默认线程改为CPU数量

parent cf41a3b8
No related branches found
No related tags found
No related merge requests found
......@@ -167,7 +167,7 @@ dependencies = [
[[package]]
name = "grapeTimerR"
version = "0.1.1"
version = "0.1.2"
dependencies = [
"chrono",
"crossbeam",
......
[package]
name = "grapeTimerR"
version = "0.1.1"
version = "0.1.2"
authors = ["jackliu100@gmail.com <jackliu100@gmail.com>"]
edition = "2018"
description = "grape schedule for rust"
documentation = "https://docs.rs/grapeTimerR/0.1.0/grapeTimerR/index.html"
documentation = "https://docs.rs/grapeTimerR"
readme = "Readme.md"
license = "Apache-2.0"
license-file = "LICENSE"
......
......@@ -43,7 +43,7 @@ pub mod timer {
id_seed:1, // 起始ID
id_type:IDMode::SequenceId,
})),
thread_pool:Arc::new(Mutex::new(TaskPool::new(time::Duration::from_secs(1),5)))
thread_pool:Arc::new(Mutex::new(TaskPool::new(time::Duration::from_secs(1),num_cpus::get())))
};
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment