Skip to content

Commit bd75463

Browse files
committed
auto merge of #5928 : huonw/rust/core-task-spawn-supervised-doc, r=thestinger
The doc-comment didn't reflect the [tasks tutorial](http://static.rust-lang.org/doc/tutorial-tasks.html#failure-modes), or how it works in practice.
2 parents d29ef7a + f43fc5f commit bd75463

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/libcore/task/mod.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -466,8 +466,9 @@ pub fn spawn_unlinked(f: ~fn()) {
466466
467467
pub fn spawn_supervised(f: ~fn()) {
468468
/*!
469-
* Creates a child task unlinked from the current one. If either this
470-
* task or the child task fails, the other will not be killed.
469+
* Creates a child task supervised by the current one. If the child
470+
* task fails, the parent will not be killed, but if the parent fails,
471+
* the child will be killed.
471472
*/
472473
473474
task().supervised().spawn(f)

0 commit comments

Comments
 (0)