From d18dd53bee476668c9f06aeb783e7a84bf89323a Mon Sep 17 00:00:00 2001 From: Pure White Date: Thu, 23 Sep 2021 12:13:54 +0800 Subject: [PATCH] doc: clarify `thread::scoped::JoinGuard` chapter Clarify that `thread::scoped::JoinGuard` has been removed from std, and why we still remain this chapter here per #57 . --- src/leaking.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/leaking.md b/src/leaking.md index e46be7df..cf592efc 100644 --- a/src/leaking.md +++ b/src/leaking.md @@ -176,6 +176,12 @@ horribly degenerate. Also *oh my gosh* it's such a ridiculous corner case. ## thread::scoped::JoinGuard +> Note: This API has already been removed from std, for more information +> you may refer [issue #24292](https://github.com/rust-lang/rust/issues/24292). +> +> We still remain this chapter here because we think this example is still +> important, regardless of if it is still in std. + The thread::scoped API intended to allow threads to be spawned that reference data on their parent's stack without any synchronization over that data by ensuring the parent joins the thread before any of the shared data goes out