From 94e4b459efa3e75c190aeb50da88a02661b3d214 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Fri, 5 May 2017 07:02:48 -0700 Subject: [PATCH] std: Prevent deadlocks in doctests on Windows Windows historically has problems with threads panicking and the main thread exiting at the same time, typically causing deadlocks. In the past (#25824) we've joined on threads but this just prevents running the test for now to avoid tampering with the example. --- src/libstd/thread/mod.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/libstd/thread/mod.rs b/src/libstd/thread/mod.rs index 8e7eaa77cd7..9cded2ab289 100644 --- a/src/libstd/thread/mod.rs +++ b/src/libstd/thread/mod.rs @@ -723,7 +723,9 @@ struct Inner { /// /// # Examples /// -/// ``` +/// ```no_run +/// # // Note that this example isn't executed by default because it causes +/// # // deadlocks on Windows unfortunately (see #25824) /// use std::thread::Builder; /// /// for i in 0..5 {