Skip to content

Commit eaa51cb

Browse files
committed
apply various suggestions from centril
1 parent 29833de commit eaa51cb

File tree

1 file changed

+17
-16
lines changed

1 file changed

+17
-16
lines changed

posts/2019-10-30-Async-await-stable.md

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,28 +8,29 @@ author: Niko Matsakis
88
Rust, as part of the 1.39.0 release.** This work has been a long time
99
in development -- the key ideas for zero-cost futures, for example,
1010
were [first proposed by Aaron Turon and Alex Crichton in
11-
2016][zcf-rust]! -- and we are very proud of the end result! We
12-
believe that Async I/O -- and async-await in particular -- is going to
13-
be an increasingly important part of Rust's story.
11+
2016][zcf-rust]! -- and we are very proud of the end result. We believe
12+
that Async I/O is going to be an increasingly important part of Rust's
13+
story.
1414

1515
While this first release of "async-await" is a momentous event, it's
1616
also only the beginning. The current support for async-await marks a
1717
kind of "Minimum Viable Product" (MVP). We expect to be polishing,
1818
improving, and extending it for some time.
1919

2020
Already, in the time since [async-await hit beta][aa-beta], we've made
21-
a lot of great progress -- including making some [key diagnostic
22-
improvements][diag] that help to make async-await errors more
21+
a lot of great progress, including making some [key diagnostic
22+
improvements][diag] that help to make async-await errors far more
2323
approachable. To get involved in that work, check out
24-
the [Async Foundations Working Group][wg] -- if nothing else, you can
25-
help us by filing bugs about polish issues or by [nominating those bugs
26-
that are bothering you the most][nom], to help direct our efforts.
24+
the [Async Foundations Working Group][wg]; if nothing else, you can
25+
help us by filing bugs about polish issues or by [nominating those
26+
bugs that are bothering you the most][nom], to help direct our
27+
efforts.
2728

2829
# Major developments in the async ecosystem
2930

3031
Now that async-await is approaching stabilization, all the major Async
31-
I/O runtimes are busily at work adding and extending their support for
32-
the new syntax:
32+
I/O runtimes are at work adding and extending their support for the
33+
new syntax:
3334

3435
* the [tokio] runtime [recently announced a number of scheduler
3536
improvements][tokio-sched], and they are planning a stable release
@@ -81,10 +82,10 @@ To use async-await, you start by writing `async fn` instead of `fn`:
8182
async fn first_function() -> u32 { .. }
8283
```
8384

84-
Unlike a regular function, calling an `async fn` doesn't do anything
85-
to start -- instead, it returns a `Future`. This is a suspended
86-
computation that is waiting to be executed. To actually *execute*
87-
the future, you have to use the `.await` operator:
85+
Unlike a regular function, calling an `async fn` doesn't have any
86+
immediate effect. Instead, it returns a `Future`. This is a suspended
87+
computation that is waiting to be executed. To actually *execute* the
88+
future, use the `.await` operator:
8889

8990
```rust
9091
async fn another_function() {
@@ -111,8 +112,8 @@ The other difference between Rust futures and futures in other
111112
languages is that they are based on a "poll" model, which makes them
112113
**zero cost**. In other languages, invoking an async function
113114
immediately creates a future and schedules it for execution: awaiting
114-
the future isn't really necessary for it to execute. But this implies
115-
some overhead for each future that is created.
115+
the future isn't necessary for it to execute. But this implies some
116+
overhead for each future that is created.
116117

117118
In contrast, in Rust, calling an async function does not do any
118119
scheduling in and of itself, which means that we can compose a complex

0 commit comments

Comments
 (0)