changed the order of timeouts to prevent connection timeout to playpen

This commit is contained in:
Carl Fredrik Samson
2020-02-01 19:22:32 +01:00
parent fe8762d9c9
commit 48e7150276
2 changed files with 4 additions and 4 deletions

View File

@@ -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.