README: remove claim about temp var reordering (#155)

...between `await` calls. Can no longer replicate.
This commit is contained in:
Ștefan Talpalaru 2021-02-10 15:49:12 +01:00 committed by GitHub
parent dcf197a8c7
commit 39456e9c18
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 13 deletions

View File

@ -122,19 +122,6 @@ proc p3() {.async.} =
waitFor p3()
```
Not as intuitive, but the same thing happens if we create those futures on the
same line as `await`, due to the Nim compiler's use of hidden temporary
variables:
```nim
proc p4() {.async.} =
await p1()
await p2()
# Also takes a single second for both futures sleeping concurrently.
waitFor p4()
```
Don't let `await`'s behaviour of giving back control to the dispatcher surprise
you. If an async procedure modifies global state, and you can't predict when it
will start executing, the only way to avoid that state changing underneath your