mirror of https://github.com/rust-lang/async-book
commit
835db30f3b
|
@ -18,7 +18,7 @@ an executor in order for anything to happen:
|
|||
|
||||
```rust
|
||||
// `block_on` blocks the current thread until the provided future has run to
|
||||
// completion. Other executors provide more complex behavior, like scheudling
|
||||
// completion. Other executors provide more complex behavior, like scheduling
|
||||
// multiple futures onto the same thread.
|
||||
use futures::executor::block_on;
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ fn get_two_sites() {
|
|||
}
|
||||
```
|
||||
|
||||
This works fine for many applications-- after, all threads were designed
|
||||
This works fine for many applications-- after all, threads were designed
|
||||
to do just this: run multiple different tasks at once. However, they also
|
||||
come with some limitations. There's a lot of overhead involved in the
|
||||
process of switching between different threads and sharing data between
|
||||
|
|
Loading…
Reference in New Issue