@@ -625,7 +625,7 @@ unsafe fn atomically<U>(f: fn() -> U) -> U {
625
625
* Several data structures are involved in task management to allow properly
626
626
* propagating failure across linked/supervised tasks.
627
627
*
628
- * (1) The "taskgroup_arc" is an arc ::exclusive which contains a hashset of
628
+ * (1) The "taskgroup_arc" is an unsafe ::exclusive which contains a hashset of
629
629
* all tasks that are part of the group. Some tasks are 'members', which
630
630
* means if they fail, they will kill everybody else in the taskgroup.
631
631
* Other tasks are 'descendants', which means they will not kill tasks
@@ -639,7 +639,7 @@ unsafe fn atomically<U>(f: fn() -> U) -> U {
639
639
* whether it's part of the 'main'/'root' taskgroup, and an optionally
640
640
* configured notification port. These are stored in TLS.
641
641
*
642
- * (3) The "ancestor_list" is a cons-style list of arc ::exclusives which
642
+ * (3) The "ancestor_list" is a cons-style list of unsafe ::exclusives which
643
643
* tracks 'generations' of taskgroups -- a group's ancestors are groups
644
644
* which (directly or transitively) spawn_supervised-ed them. Each task
645
645
* is recorded in the 'descendants' of each of its ancestor groups.
@@ -725,7 +725,7 @@ type taskgroup_data = {
725
725
// tasks in this group.
726
726
mut descendants: taskset,
727
727
} ;
728
- type taskgroup_arc = arc :: exclusive<option<taskgroup_data>>;
728
+ type taskgroup_arc = unsafe :: exclusive<option<taskgroup_data>>;
729
729
730
730
type taskgroup_inner = & mut option<taskgroup_data>;
731
731
@@ -754,15 +754,15 @@ type ancestor_node = {
754
754
// Recursive rest of the list.
755
755
mut ancestors: ancestor_list,
756
756
} ;
757
- enum ancestor_list = option<arc :: exclusive<ancestor_node>>;
757
+ enum ancestor_list = option<unsafe :: exclusive<ancestor_node>>;
758
758
759
759
// Accessors for taskgroup arcs and ancestor arcs that wrap the unsafety.
760
760
#[ inline( always) ]
761
761
fn access_group<U >( x: taskgroup_arc, blk: fn ( taskgroup_inner) -> U ) -> U {
762
762
unsafe { x. with( blk) }
763
763
}
764
764
#[ inline( always) ]
765
- fn access_ancestors<U >( x: arc :: exclusive<ancestor_node>,
765
+ fn access_ancestors<U >( x: unsafe :: exclusive<ancestor_node>,
766
766
blk: fn ( x: & mut ancestor_node) -> U ) -> U {
767
767
unsafe { x. with( blk) }
768
768
}
@@ -1035,8 +1035,8 @@ fn gen_child_taskgroup(linked: bool, supervised: bool)
1035
1035
let mut members = new_taskset( ) ;
1036
1036
taskset_insert( & mut members, spawner) ;
1037
1037
let tasks =
1038
- arc :: exclusive( some( { mut members: members,
1039
- mut descendants: new_taskset( ) } ) ) ;
1038
+ unsafe :: exclusive( some( { mut members: members,
1039
+ mut descendants: new_taskset( ) } ) ) ;
1040
1040
// Main task/group has no ancestors, no notifier, etc.
1041
1041
let group =
1042
1042
@tcb( spawner, tasks, ancestor_list( none) , true, none) ;
@@ -1057,8 +1057,8 @@ fn gen_child_taskgroup(linked: bool, supervised: bool)
1057
1057
( g, a, spawner_group. is_main)
1058
1058
} else {
1059
1059
// Child is in a separate group from spawner.
1060
- let g = arc :: exclusive( some( { mut members: new_taskset( ) ,
1061
- mut descendants: new_taskset( ) } ) ) ;
1060
+ let g = unsafe :: exclusive( some( { mut members: new_taskset( ) ,
1061
+ mut descendants: new_taskset( ) } ) ) ;
1062
1062
let a = if supervised {
1063
1063
// Child's ancestors start with the spawner.
1064
1064
let old_ancestors = share_ancestors( & mut spawner_group. ancestors) ;
@@ -1072,7 +1072,7 @@ fn gen_child_taskgroup(linked: bool, supervised: bool)
1072
1072
} ;
1073
1073
assert new_generation < uint:: max_value;
1074
1074
// Build a new node in the ancestor list.
1075
- ancestor_list( some( arc :: exclusive(
1075
+ ancestor_list( some( unsafe :: exclusive(
1076
1076
{ generation: new_generation,
1077
1077
mut parent_group: some( spawner_group. tasks. clone( ) ) ,
1078
1078
mut ancestors: old_ancestors } ) ) )
0 commit comments