From 48e71502766904fc1182191d8a7fce4d8ccfc252 Mon Sep 17 00:00:00 2001 From: Carl Fredrik Samson Date: Sat, 1 Feb 2020 19:22:32 +0100 Subject: [PATCH] changed the order of timeouts to prevent connection timeout to playpen --- src/6_future_example.md | 4 ++-- src/8_finished_example.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/6_future_example.md b/src/6_future_example.md index b9c3cb3..9eaf838 100644 --- a/src/6_future_example.md +++ b/src/6_future_example.md @@ -416,8 +416,8 @@ fn main() { // - first parameter is the `reactor` // - the second is a timeout in seconds // - the third is an `id` to identify the task - let future1 = Task::new(reactor.clone(), 2, 1); - let future2 = Task::new(reactor.clone(), 1, 2); + let future1 = Task::new(reactor.clone(), 1, 1); + let future2 = Task::new(reactor.clone(), 2, 2); // an `async` block works the same way as an `async fn` in that it compiles // our code into a state machine, `yielding` at every `await` point. diff --git a/src/8_finished_example.md b/src/8_finished_example.md index 198fa63..db1c766 100644 --- a/src/8_finished_example.md +++ b/src/8_finished_example.md @@ -18,8 +18,8 @@ fn main() { let reactor = Reactor::new(); let reactor = Arc::new(Mutex::new(reactor)); - let future1 = Task::new(reactor.clone(), 2, 1); - let future2 = Task::new(reactor.clone(), 1, 2); + let future1 = Task::new(reactor.clone(), 1, 1); + let future2 = Task::new(reactor.clone(), 2, 2); let fut1 = async { let val = future1.await;