File tree 3 files changed +4
-4
lines changed
3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ different threads, like this:
12
12
{{#include ../../examples/01_02_why_async/src/lib.rs:get_two_sites}}
13
13
```
14
14
15
- This works fine for many applications-- after all, threads were designed
15
+ This works fine for many applications— after all, threads were designed
16
16
to do just this: run multiple different tasks at once. However, they also
17
17
come with some limitations. There's a lot of overhead involved in the
18
18
process of switching between different threads and sharing data between
@@ -29,7 +29,7 @@ once without creating multiple threads:
29
29
Overall, asynchronous applications have the potential to be much faster and
30
30
use fewer resources than a corresponding threaded implementation. However,
31
31
there is a cost. Threads are natively supported by the operating system,
32
- and using them doesn't require any special programming model-- any function
32
+ and using them doesn't require any special programming model— any function
33
33
can create a thread, and calling a function that uses threads is usually
34
34
just as easy as calling any normal function. However, asynchronous functions
35
35
require special support from the language or libraries.
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ individually:
48
48
{{#include ../../examples/01_04_async_await_primer/src/lib.rs:block_on_each}}
49
49
```
50
50
51
- However, we're not giving the best performance possible this way-- we're
51
+ However, we're not giving the best performance possible this way— we're
52
52
only ever doing one thing at once! Clearly we have to learn the song before
53
53
we can sing it, but it's possible to dance at the same time as learning and
54
54
singing the song. To do this, we can create two separate ` async fn ` which
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ enum Recursive {
33
33
}
34
34
```
35
35
36
- This won't work-- we've created an infinitely-sized type!
36
+ This won't work— we've created an infinitely-sized type!
37
37
The compiler will complain:
38
38
39
39
```
You can’t perform that action at this time.
0 commit comments