diff --git a/Cargo.lock b/Cargo.lock index b25f6c26..2d6f0999 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1463,7 +1463,7 @@ dependencies = [ [[package]] name = "g3-runtime" -version = "0.4.0" +version = "0.5.0" dependencies = [ "anyhow", "g3-compat", diff --git a/Cargo.toml b/Cargo.toml index f8acf704..bc16ccb6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -224,7 +224,7 @@ g3-msgpack = { version = "0.4", path = "lib/g3-msgpack" } g3-openssl = { version = "0.4", path = "lib/g3-openssl" } g3-redis-client = { version = "0.3", path = "lib/g3-redis-client" } g3-resolver = { version = "0.9", path = "lib/g3-resolver" } -g3-runtime = { version = "0.4", path = "lib/g3-runtime" } +g3-runtime = { version = "0.5", path = "lib/g3-runtime" } g3-slog-types = { version = "0.2", path = "lib/g3-slog-types" } g3-smtp-proto = { version = "0.2", path = "lib/g3-smtp-proto" } g3-socket = { version = "0.5", path = "lib/g3-socket" } diff --git a/lib/g3-runtime/Cargo.toml b/lib/g3-runtime/Cargo.toml index 00356b28..ff916134 100644 --- a/lib/g3-runtime/Cargo.toml +++ b/lib/g3-runtime/Cargo.toml @@ -1,8 +1,9 @@ [package] name = "g3-runtime" -version = "0.4.0" +version = "0.5.0" license.workspace = true edition.workspace = true +rust-version.workspace = true # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/lib/g3-runtime/src/unaided/mod.rs b/lib/g3-runtime/src/unaided/mod.rs index e57b74b9..9bf8b981 100644 --- a/lib/g3-runtime/src/unaided/mod.rs +++ b/lib/g3-runtime/src/unaided/mod.rs @@ -235,11 +235,10 @@ impl UnaidedRuntimeConfig { .spawn(move || { trace!("started worker thread #{i}"); - if let Some(set) = cpu_set { - if let Err(e) = set.apply_to_local_thread() { + if let Some(set) = cpu_set + && let Err(e) = set.apply_to_local_thread() { warn!("failed to set sched affinity for worker thread {i}: {e}"); } - } let mut builder = tokio::runtime::Builder::new_current_thread(); builder.enable_all();