Add logging around parallelism

This commit is contained in:
asonix 2023-07-26 22:51:07 -05:00
parent 5d526c60fe
commit 11d81683e3

View file

@ -464,11 +464,14 @@ impl Spawner {
pub(crate) fn build() -> std::io::Result<Self> {
let threads = std::thread::available_parallelism()
.map(usize::from)
.map_err(|e| tracing::warn!("Failed to get parallelism, {e}"))
.unwrap_or(1);
let (sender, receiver) = flume::bounded(8);
let (shutdown, shutdown_rx) = flume::bounded(threads);
tracing::warn!("Launching {threads} signature threads");
let threads = (0..threads)
.map(|i| {
let receiver = receiver.clone();