From debf941bc391e69b5116307336c0a2081f4de331 Mon Sep 17 00:00:00 2001 From: AzureMarker Date: Sat, 12 Feb 2022 19:20:46 -0800 Subject: [PATCH] Rename affinity to "ideal processor" --- ctru-rs/examples/futures-basic.rs | 2 +- ctru-rs/examples/futures-tokio.rs | 2 +- ctru-rs/examples/thread-locals.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ctru-rs/examples/futures-basic.rs b/ctru-rs/examples/futures-basic.rs index c9a6a5d..0a21c93 100644 --- a/ctru-rs/examples/futures-basic.rs +++ b/ctru-rs/examples/futures-basic.rs @@ -30,7 +30,7 @@ fn main() { let (exit_sender, mut exit_receiver) = futures::channel::oneshot::channel(); let (mut timer_sender, mut timer_receiver) = futures::channel::mpsc::channel(0); let executor_thread = std::thread::Builder::new() - .affinity(1) + .ideal_processor(1) .spawn(move || { let mut executor = futures::executor::LocalPool::new(); diff --git a/ctru-rs/examples/futures-tokio.rs b/ctru-rs/examples/futures-tokio.rs index 045d1e4..5ce7e15 100644 --- a/ctru-rs/examples/futures-tokio.rs +++ b/ctru-rs/examples/futures-tokio.rs @@ -30,7 +30,7 @@ fn main() { let runtime_thread = std::thread::Builder::new() // Run on the system core - .affinity(1) + .ideal_processor(1) .spawn(move || { runtime.block_on(async move { let mut wake_time = tokio::time::Instant::now() + Duration::from_secs(1); diff --git a/ctru-rs/examples/thread-locals.rs b/ctru-rs/examples/thread-locals.rs index d69c1b7..4437a41 100644 --- a/ctru-rs/examples/thread-locals.rs +++ b/ctru-rs/examples/thread-locals.rs @@ -32,7 +32,7 @@ fn main() { }); std::thread::Builder::new() - .affinity(1) + .ideal_processor(1) .spawn(move || { MY_LOCAL.with(|local| { println!("Initial value on second thread: {}", local.borrow());