We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c02090d commit 2089cb3Copy full SHA for 2089cb3
std/src/thread/spawnhook.rs
@@ -3,8 +3,12 @@ use crate::iter;
3
use crate::sync::Arc;
4
use crate::thread::Thread;
5
6
-// A thread local linked list of spawn hooks.
7
crate::thread_local! {
+ /// A thread local linked list of spawn hooks.
8
+ ///
9
+ /// It is a linked list of Arcs, such that it can very cheaply be inhereted by spawned threads.
10
11
+ /// (That technically makes it a set of linked lists with shared tails, so a linked tree.)
12
static SPAWN_HOOKS: Cell<SpawnHooks> = const { Cell::new(SpawnHooks { first: None }) };
13
}
14
@@ -42,7 +46,7 @@ struct SpawnHook {
42
46
///
43
47
/// Hooks can only be added, not removed.
44
48
45
-/// The hooks will run in order, starting with the most recently added.
49
+/// The hooks will run in reverse order, starting with the most recently added.
50
51
/// # Usage
52
0 commit comments