From fd9b58498d2a61ea7959b5747fdae9557b12a189 Mon Sep 17 00:00:00 2001 From: AzureMarker Date: Sat, 5 Feb 2022 22:23:00 -0800 Subject: [PATCH] IT WORKS Needs some fixes in pthread-3ds. Made the log less noisy and added some comments. --- ctru-rs/examples/futures-tokio-basic.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ctru-rs/examples/futures-tokio-basic.rs b/ctru-rs/examples/futures-tokio-basic.rs index 423a45f..60753a2 100644 --- a/ctru-rs/examples/futures-tokio-basic.rs +++ b/ctru-rs/examples/futures-tokio-basic.rs @@ -26,15 +26,15 @@ fn main() { .expect("Couldn't build runtime"); let runtime_thread = ctru::thread::Builder::new() + // Run on the system core .affinity(1) + // Use a bigger stack size. Default is 0x1000 but we'd easily overflow that. .stack_size(0x200000) .spawn(move || { runtime.block_on(async move { - println!("Start of future"); let mut wake_time = tokio::time::Instant::now() + Duration::from_secs(1); let mut iteration = 0; loop { - println!("Start of loop"); let sleep_future = tokio::time::sleep_until(wake_time); tokio::select! {