From 6f9c1323a7a0fe162a5642e229d54afec7ccb299 Mon Sep 17 00:00:00 2001 From: Mara Bos Date: Thu, 24 Sep 2020 19:25:21 +0200 Subject: [PATCH] Call ReentrantMutex::init() in stdout(). --- library/std/src/io/stdio.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/library/std/src/io/stdio.rs b/library/std/src/io/stdio.rs index 05bdbe0f563..b7d3c47e24b 100644 --- a/library/std/src/io/stdio.rs +++ b/library/std/src/io/stdio.rs @@ -548,7 +548,9 @@ pub fn stdout() -> Stdout { } } }); - ReentrantMutex::new(RefCell::new(LineWriter::new(stdout_raw()))) + let r = ReentrantMutex::new(RefCell::new(LineWriter::new(stdout_raw()))); + r.init(); + r }), } }