mirror of
https://github.com/mainmatter/100-exercises-to-learn-rust
synced 2024-12-26 21:58:49 +01:00
Update 04_scoped_threads.md (#21)
Fix incorrect statement and remove unintended line break.
This commit is contained in:
parent
d5f407d720
commit
63d9ed8478
1 changed files with 3 additions and 3 deletions
|
@ -67,7 +67,7 @@ That's not an issue with `std::thread::scope`—you can **safely borrow from the
|
||||||
|
|
||||||
In our example, `v` is created before the spawning points.
|
In our example, `v` is created before the spawning points.
|
||||||
It will only be dropped _after_ `scope` returns. At the same time,
|
It will only be dropped _after_ `scope` returns. At the same time,
|
||||||
all threads spawned inside `scope` are guaranteed `v` is dropped,
|
all threads spawned inside `scope` are guaranteed to finish _before_ `scope` returns,
|
||||||
therefore there is no risk of having dangling references.
|
therefore there is no risk of having dangling references.
|
||||||
|
|
||||||
The compiler won't complain!
|
The compiler won't complain!
|
Loading…
Reference in a new issue