Merge pull request #1305 from platformer/issue1298

fix(threads1): make program panic if threads are not joined
This commit is contained in:
liv
2023-02-12 16:50:03 +01:00
committed by GitHub
2 changed files with 17 additions and 10 deletions

View File

@@ -909,7 +909,7 @@ A challenge with multi-threaded applications is that the main thread can
finish before the spawned threads are completed.
https://doc.rust-lang.org/book/ch16-01-threads.html#waiting-for-all-threads-to-finish-using-join-handles
Collect the JoinHandles and wait for them to finish.
Use the JoinHandles to wait for each thread to finish and collect their results.
https://doc.rust-lang.org/std/thread/struct.JoinHandle.html
"""