@@ -146,7 +146,7 @@ type sched_opts = {
146
146
*
147
147
* # Fields
148
148
*
149
- * * supervise - Do not propagate failure to the parent task
149
+ * * linked - Do not propagate failure to the parent task
150
150
*
151
151
* All tasks are linked together via a tree, from parents to children. By
152
152
* default children are 'supervised' by their parent and when they fail
@@ -169,7 +169,7 @@ type sched_opts = {
169
169
* scheduler other tasks will be impeded or even blocked indefinitely.
170
170
*/
171
171
type task_opts = {
172
- supervise : bool ,
172
+ linked : bool ,
173
173
parented : bool ,
174
174
notify_chan : option < comm:: chan < notification > > ,
175
175
sched : option < sched_opts > ,
@@ -207,7 +207,7 @@ fn default_task_opts() -> task_opts {
207
207
*/
208
208
209
209
{
210
- supervise : true,
210
+ linked : true,
211
211
parented: false ,
212
212
notify_chan: none,
213
213
sched: none
@@ -239,7 +239,7 @@ fn set_opts(builder: builder, opts: task_opts) {
239
239
* To update a single option use a pattern like the following:
240
240
*
241
241
* set_opts(builder, {
242
- * supervise : false
242
+ * linked : false
243
243
* with get_opts(builder)
244
244
* });
245
245
*/
@@ -360,7 +360,7 @@ fn unsupervise(builder: builder) {
360
360
//! Configures the new task to not propagate failure to its parent
361
361
362
362
set_opts ( builder, {
363
- supervise : false
363
+ linked : false
364
364
with get_opts ( builder)
365
365
} ) ;
366
366
}
@@ -745,15 +745,15 @@ fn share_parent_taskgroup() -> (taskgroup_arc, bool) {
745
745
746
746
fn spawn_raw ( opts : task_opts , +f : fn ~( ) ) {
747
747
// Decide whether the child needs to be in a new linked failure group.
748
- let ( ( child_tg, is_main) , parent_tg) = if opts. supervise {
748
+ let ( ( child_tg, is_main) , parent_tg) = if opts. linked {
749
749
// It doesn't mean anything for a linked-spawned-task to have a parent
750
750
// group. The spawning task is already bidirectionally linked to it.
751
751
( share_parent_taskgroup ( ) , none)
752
752
} else {
753
753
// Detached from the parent group; create a new (non-main) one.
754
754
( ( arc:: exclusive ( some ( ( dvec:: dvec ( ) , dvec:: dvec ( ) ) ) ) , false ) ,
755
755
// Allow the parent to unidirectionally fail the child?
756
- if opts. parented { // FIXME(#1868) rename to unsupervise.
756
+ if opts. parented {
757
757
let ( pg, _) = share_parent_taskgroup ( ) ; some ( pg)
758
758
} else {
759
759
none
@@ -1145,7 +1145,7 @@ fn test_spawn_raw_simple() {
1145
1145
#[ ignore( cfg( windows) ) ]
1146
1146
fn test_spawn_raw_unsupervise ( ) {
1147
1147
let opts = {
1148
- supervise : false
1148
+ linked : false
1149
1149
with default_task_opts ( )
1150
1150
} ;
1151
1151
do spawn_raw( opts) {
@@ -1269,7 +1269,7 @@ fn test_spawn_raw_notify() {
1269
1269
assert comm:: recv ( notify_po) == exit ( task_, success) ;
1270
1270
1271
1271
let opts = {
1272
- supervise : false,
1272
+ linked : false,
1273
1273
notify_chan: some ( notify_ch)
1274
1274
with default_task_opts ( )
1275
1275
} ;
@@ -1592,7 +1592,7 @@ fn test_unkillable() {
1592
1592
let ch = po.chan();
1593
1593
1594
1594
// We want to do this after failing
1595
- do spawn_raw({ supervise : false with default_task_opts() }) {
1595
+ do spawn_raw({ linked : false with default_task_opts() }) {
1596
1596
for iter::repeat(10u) { yield() }
1597
1597
ch.send(());
1598
1598
}
@@ -1629,7 +1629,7 @@ fn test_unkillable_nested() {
1629
1629
let ch = po.chan();
1630
1630
1631
1631
// We want to do this after failing
1632
- do spawn_raw({ supervise : false with default_task_opts() }) {
1632
+ do spawn_raw({ linked : false with default_task_opts() }) {
1633
1633
for iter::repeat(10u) { yield() }
1634
1634
ch.send(());
1635
1635
}
0 commit comments