Skip to content

Commit cf5dc48

Browse files
committed
---
yaml --- r: 22638 b: refs/heads/master c: 07bb1ae h: refs/heads/master v: v3
1 parent 96427d5 commit cf5dc48

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: bb2c45feaea4cac94fe0e9dc694ff5bfae038925
2+
refs/heads/master: 07bb1aefc9a88e213c8e36f515ffb6a9148614fd
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: cd6f24f9d14ac90d167386a56e7a6ac1f0318195
55
refs/heads/try: ffbe0e0e00374358b789b0037bcb3a577cd218be

trunk/src/libcore/task.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ type sched_opts = {
146146
*
147147
* # Fields
148148
*
149-
* * supervise - Do not propagate failure to the parent task
149+
* * linked - Do not propagate failure to the parent task
150150
*
151151
* All tasks are linked together via a tree, from parents to children. By
152152
* default children are 'supervised' by their parent and when they fail
@@ -169,7 +169,7 @@ type sched_opts = {
169169
* scheduler other tasks will be impeded or even blocked indefinitely.
170170
*/
171171
type task_opts = {
172-
supervise: bool,
172+
linked: bool,
173173
parented: bool,
174174
notify_chan: option<comm::chan<notification>>,
175175
sched: option<sched_opts>,
@@ -207,7 +207,7 @@ fn default_task_opts() -> task_opts {
207207
*/
208208

209209
{
210-
supervise: true,
210+
linked: true,
211211
parented: false,
212212
notify_chan: none,
213213
sched: none
@@ -239,7 +239,7 @@ fn set_opts(builder: builder, opts: task_opts) {
239239
* To update a single option use a pattern like the following:
240240
*
241241
* set_opts(builder, {
242-
* supervise: false
242+
* linked: false
243243
* with get_opts(builder)
244244
* });
245245
*/
@@ -360,7 +360,7 @@ fn unsupervise(builder: builder) {
360360
//! Configures the new task to not propagate failure to its parent
361361
362362
set_opts(builder, {
363-
supervise: false
363+
linked: false
364364
with get_opts(builder)
365365
});
366366
}
@@ -745,15 +745,15 @@ fn share_parent_taskgroup() -> (taskgroup_arc, bool) {
745745

746746
fn spawn_raw(opts: task_opts, +f: fn~()) {
747747
// 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 {
749749
// It doesn't mean anything for a linked-spawned-task to have a parent
750750
// group. The spawning task is already bidirectionally linked to it.
751751
(share_parent_taskgroup(), none)
752752
} else {
753753
// Detached from the parent group; create a new (non-main) one.
754754
((arc::exclusive(some((dvec::dvec(),dvec::dvec()))), false),
755755
// Allow the parent to unidirectionally fail the child?
756-
if opts.parented { // FIXME(#1868) rename to unsupervise.
756+
if opts.parented {
757757
let (pg,_) = share_parent_taskgroup(); some(pg)
758758
} else {
759759
none
@@ -1145,7 +1145,7 @@ fn test_spawn_raw_simple() {
11451145
#[ignore(cfg(windows))]
11461146
fn test_spawn_raw_unsupervise() {
11471147
let opts = {
1148-
supervise: false
1148+
linked: false
11491149
with default_task_opts()
11501150
};
11511151
do spawn_raw(opts) {
@@ -1269,7 +1269,7 @@ fn test_spawn_raw_notify() {
12691269
assert comm::recv(notify_po) == exit(task_, success);
12701270

12711271
let opts = {
1272-
supervise: false,
1272+
linked: false,
12731273
notify_chan: some(notify_ch)
12741274
with default_task_opts()
12751275
};
@@ -1592,7 +1592,7 @@ fn test_unkillable() {
15921592
let ch = po.chan();
15931593
15941594
// 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() }) {
15961596
for iter::repeat(10u) { yield() }
15971597
ch.send(());
15981598
}
@@ -1629,7 +1629,7 @@ fn test_unkillable_nested() {
16291629
let ch = po.chan();
16301630
16311631
// 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() }) {
16331633
for iter::repeat(10u) { yield() }
16341634
ch.send(());
16351635
}

0 commit comments

Comments
 (0)