Skip to content

Commit f16c4bf

Browse files
committed
tweak language to be specific JS or C#
1 parent 8e965c3 commit f16c4bf

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

posts/2019-11-07-Async-await-stable.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,8 @@ can "pause", return control to the runtime, and then pick up from
8282
where they left off. Typically those pauses are to wait for I/O, but
8383
there can be any number of uses.
8484

85-
You may be familiar with the async-await from other languages, such as
86-
JavaScript or C#. Rust's version of the feature is similar, but with a
87-
few key differences.
85+
You may be familiar with the async-await from JavaScript or C#. Rust's
86+
version of the feature is similar, but with a few key differences.
8887

8988
To use async-await, you start by writing `async fn` instead of `fn`:
9089

@@ -118,12 +117,12 @@ errors. It also has the advantage of making method chaining painless.
118117

119118
### Zero-cost futures
120119

121-
The other difference between Rust futures and futures in other
122-
languages is that they are based on a "poll" model, which makes them
123-
**zero cost**. In other languages, invoking an async function
124-
immediately creates a future and schedules it for execution: awaiting
125-
the future isn't necessary for it to execute. But this implies some
126-
overhead for each future that is created.
120+
The other difference between Rust futures and futures in JS and C# is
121+
that they are based on a "poll" model, which makes them **zero
122+
cost**. In other languages, invoking an async function immediately
123+
creates a future and schedules it for execution: awaiting the future
124+
isn't necessary for it to execute. But this implies some overhead for
125+
each future that is created.
127126

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

0 commit comments

Comments
 (0)