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 @@ -2,8 +2,12 @@ use crate::cell::Cell;
2
2
use crate :: sync:: Arc ;
3
3
use crate :: thread:: Thread ;
4
4
5
- // A thread local linked list of spawn hooks.
6
5
crate :: thread_local! {
6
+ /// A thread local linked list of spawn hooks.
7
+ ///
8
+ /// It is a linked list of Arcs, such that it can very cheaply be inhereted by spawned threads.
9
+ ///
10
+ /// (That technically makes it a set of linked lists with shared tails, so a linked tree.)
7
11
static SPAWN_HOOKS : Cell <SpawnHooks > = const { Cell :: new( SpawnHooks { first: None } ) } ;
8
12
}
9
13
@@ -41,7 +45,7 @@ struct SpawnHook {
41
45
///
42
46
/// Hooks can only be added, not removed.
43
47
///
44
- /// The hooks will run in order, starting with the most recently added.
48
+ /// The hooks will run in reverse order, starting with the most recently added.
45
49
///
46
50
/// # Usage
47
51
///
You can’t perform that action at this time.
0 commit comments