From cd37979ceb5ced3df892cc9af69ac60eba9160e4 Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Tue, 16 Aug 2022 22:50:42 +0900 Subject: [PATCH] Miri: Fix thread leak in WaitGroup doctest --- crossbeam-utils/src/sync/wait_group.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crossbeam-utils/src/sync/wait_group.rs b/crossbeam-utils/src/sync/wait_group.rs index caf201482..19d607415 100644 --- a/crossbeam-utils/src/sync/wait_group.rs +++ b/crossbeam-utils/src/sync/wait_group.rs @@ -39,6 +39,7 @@ use std::fmt; /// /// // Block until all threads have finished their work. /// wg.wait(); +/// # std::thread::sleep(std::time::Duration::from_millis(500)); // wait for background threads closed: https://github.com/rust-lang/miri/issues/1371 /// ``` /// /// [`Barrier`]: std::sync::Barrier