File tree 1 file changed +6
-2
lines changed
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -3,8 +3,12 @@ use crate::iter;
3
3
use crate :: sync:: Arc ;
4
4
use crate :: thread:: Thread ;
5
5
6
- // A thread local linked list of spawn hooks.
7
6
crate :: thread_local! {
7
+ /// 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.)
8
12
static SPAWN_HOOKS : Cell <SpawnHooks > = const { Cell :: new( SpawnHooks { first: None } ) } ;
9
13
}
10
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.
46
50
///
47
51
/// # Usage
48
52
///
You can’t perform that action at this time.
0 commit comments