Skip to content

Commit c75dfd6

Browse files
committed
---
yaml --- r: 81305 b: refs/heads/snap-stage3 c: 6f16689 h: refs/heads/master i: 81303: 1c76e05 v: v3
1 parent 66ef7f6 commit c75dfd6

File tree

3 files changed

+24
-34
lines changed

3 files changed

+24
-34
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 4c6bf4872012c010f84dc7fa2cdfe87522533f89
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: d6c3b67348d9d6860051a04ee24e284414fa49a6
4+
refs/heads/snap-stage3: 6f166894ba4b5c4141212bc9f88361b6454c4b65
55
refs/heads/try: 70152ff55722878cde684ee6462c14c65f2c4729
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/libstd/task/mod.rs

Lines changed: 19 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -13,34 +13,16 @@
1313
*
1414
* An executing Rust program consists of a tree of tasks, each with their own
1515
* stack, and sole ownership of their allocated heap data. Tasks communicate
16-
* with each other using ports and channels (see std::rt::comm for more info
17-
* about how communication works).
16+
* with each other using ports and channels.
1817
*
19-
* Tasks can be spawned in 3 different modes.
18+
* When a task fails, that failure will propagate to its parent (the task
19+
* that spawned it) and the parent will fail as well. The reverse is not
20+
* true: when a parent task fails its children will continue executing. When
21+
* the root (main) task fails, all tasks fail, and then so does the entire
22+
* process.
2023
*
21-
* * Bidirectionally linked: This is the default mode and it's what ```spawn``` does.
22-
* Failures will be propagated from parent to child and vice versa.
23-
*
24-
* * Unidirectionally linked (parent->child): This type of task can be created with
25-
* ```spawn_supervised```. In this case, failures are propagated from parent to child
26-
* but not the other way around.
27-
*
28-
* * Unlinked: Tasks can be completely unlinked. These tasks can be created by using
29-
* ```spawn_unlinked```. In this case failures are not propagated at all.
30-
*
31-
* Tasks' failure modes can be further configured. For instance, parent tasks can (un)watch
32-
* children failures. Please, refer to TaskBuilder's documentation bellow for more information.
33-
*
34-
* When a (bi|uni)directionally linked task fails, its failure will be propagated to all tasks
35-
* linked to it, this will cause such tasks to fail by a `linked failure`.
36-
*
37-
* Task Scheduling:
38-
*
39-
* By default, every task is created in the same scheduler as its parent, where it
40-
* is scheduled cooperatively with all other tasks in that scheduler. Some specialized
41-
* applications may want more control over their scheduling, in which case they can be
42-
* spawned into a new scheduler with the specific properties required. See TaskBuilder's
43-
* documentation bellow for more information.
24+
* Tasks may execute in parallel and are scheduled automatically by the
25+
* runtime.
4426
*
4527
* # Example
4628
*
@@ -138,9 +120,17 @@ pub struct SchedOpts {
138120
* * name - A name for the task-to-be, for identification in failure messages.
139121
*
140122
* * sched - Specify the configuration of a new scheduler to create the task
141-
* in. This is of particular importance for libraries which want to call
142-
* into foreign code that blocks. Without doing so in a different
143-
* scheduler other tasks will be impeded or even blocked indefinitely.
123+
* in
124+
*
125+
* By default, every task is created in the same scheduler as its
126+
* parent, where it is scheduled cooperatively with all other tasks
127+
* in that scheduler. Some specialized applications may want more
128+
* control over their scheduling, in which case they can be spawned
129+
* into a new scheduler with the specific properties required.
130+
*
131+
* This is of particular importance for libraries which want to call
132+
* into foreign code that blocks. Without doing so in a different
133+
* scheduler other tasks will be impeded or even blocked indefinitely.
144134
*/
145135
pub struct TaskOpts {
146136
linked: bool,

branches/snap-stage3/src/libsyntax/ext/expand.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -813,23 +813,23 @@ pub fn std_macros() -> @str {
813813
mod fmt_extension {
814814
#[macro_escape];
815815

816-
macro_rules! fmt(($($arg:tt)*) => (oldformat!($($arg)*)))
816+
macro_rules! fmt(($($arg:tt)*) => (oldfmt!($($arg)*)))
817817

818818
macro_rules! log(
819819
($lvl:expr, $arg:expr) => ({
820820
let lvl = $lvl;
821821
if lvl <= __log_level() {
822822
format_args!(|args| {
823823
::std::logging::log(lvl, args)
824-
}, \"{}\", format!(\"{:?}\", $arg))
824+
}, \"{}\", fmt!(\"{:?}\", $arg))
825825
}
826826
});
827827
($lvl:expr, $($arg:expr),+) => ({
828828
let lvl = $lvl;
829829
if lvl <= __log_level() {
830830
format_args!(|args| {
831831
::std::logging::log(lvl, args)
832-
}, \"{}\", format!($($arg),+))
832+
}, \"{}\", fmt!($($arg),+))
833833
}
834834
})
835835
)
@@ -848,7 +848,7 @@ pub fn std_macros() -> @str {
848848
::std::sys::FailWithCause::fail_with($msg, file!(), line!())
849849
);
850850
($( $arg:expr ),+) => (
851-
::std::sys::FailWithCause::fail_with(format!( $($arg),+ ), file!(), line!())
851+
::std::sys::FailWithCause::fail_with(fmt!( $($arg),+ ), file!(), line!())
852852
)
853853
)
854854
}

0 commit comments

Comments
 (0)