Skip to content

Commit

Permalink
Miri: Fix thread leaks in WaitGroup doctest
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki-e committed Sep 29, 2022
1 parent c6ee125 commit f7a53b7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions crossbeam-utils/src/sync/wait_group.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ impl WaitGroup {
///
/// // Block until both threads have reached `wait()`.
/// wg.wait();
/// # std::thread::sleep(std::time::Duration::from_millis(500)); // wait for background threads closed: https://github.com/rust-lang/miri/issues/1371
/// ```
pub fn wait(self) {
if *self.inner.count.lock().unwrap() == 1 {
Expand Down

0 comments on commit f7a53b7

Please sign in to comment.