mirror of
https://github.com/mainmatter/100-exercises-to-learn-rust
synced 2024-11-16 19:50:44 +01:00
Ch-08 Futures Exercise 02: Fix typo (#106)
This commit is contained in:
parent
5660a2f7a8
commit
de45f8adf2
1 changed files with 1 additions and 1 deletions
|
@ -112,7 +112,7 @@ pub async fn work() {
|
||||||
|
|
||||||
### `std::thread::spawn` vs `tokio::spawn`
|
### `std::thread::spawn` vs `tokio::spawn`
|
||||||
|
|
||||||
You can think of `tokio::spawn` as the asynchronous sibling of `std::spawn::thread`.
|
You can think of `tokio::spawn` as the asynchronous sibling of `std::thread::spawn`.
|
||||||
|
|
||||||
Notice a key difference: with `std::thread::spawn`, you're delegating control to the OS scheduler.
|
Notice a key difference: with `std::thread::spawn`, you're delegating control to the OS scheduler.
|
||||||
You're not in control of how threads are scheduled.
|
You're not in control of how threads are scheduled.
|
||||||
|
|
Loading…
Reference in a new issue