Skip to content

Commit 546fb39

Browse files
committed
---
yaml --- r: 216831 b: refs/heads/stable c: 4d1e48e h: refs/heads/master i: 216829: b44a887 216827: 2526ccd 216823: 4b70128 216815: 6600962 216799: c54a02a 216767: de71cdf 216703: 71b7b5b 216575: 0d20320 v: v3
1 parent ee4d9a6 commit 546fb39

File tree

192 files changed

+1329
-5188
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

192 files changed

+1329
-5188
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@ refs/heads/tmp: 378a370ff2057afeb1eae86eb6e78c476866a4a6
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: a5286998df566e736b32f6795bfc3803bdaf453d
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32-
refs/heads/stable: ad1c0c57b8710a569a2ed573a1d47b98fe5616b1
32+
refs/heads/stable: 4d1e48e37610f421f30e098f2ae9ef98b85b66eb
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375

branches/stable/AUTHORS.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,6 @@ Luke Francl <[email protected]>
518518
Luke Metz <[email protected]>
519519
Luke Steensen <[email protected]>
520520
Luqman Aden <[email protected]>
521-
Łukasz Niemier <[email protected]>
522521
Magnus Auvinen <[email protected]>
523522
Mahmut Bulut <[email protected]>
524523
Makoto Nakashima <[email protected]>
@@ -998,4 +997,5 @@ xales <[email protected]>
998997
999998
1000999
1000+
Łukasz Niemier <[email protected]>
10011001

branches/stable/configure

Lines changed: 7 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,6 @@ err() {
1919
exit 1
2020
}
2121

22-
run() {
23-
msg "$@"
24-
"$@"
25-
}
26-
2722
need_ok() {
2823
if [ $? -ne 0 ]
2924
then
@@ -41,7 +36,8 @@ need_cmd() {
4136
make_dir() {
4237
if [ ! -d $1 ]
4338
then
44-
run mkdir -p $1
39+
msg "mkdir -p $1"
40+
mkdir -p $1
4541
fi
4642
}
4743

@@ -50,7 +46,8 @@ copy_if_changed() {
5046
then
5147
msg "leaving $2 unchanged"
5248
else
53-
run cp -f $1 $2
49+
msg "cp $1 $2"
50+
cp -f $1 $2
5451
chmod u-w $2 # make copied artifact read-only
5552
fi
5653
}
@@ -60,7 +57,8 @@ move_if_changed() {
6057
then
6158
msg "leaving $2 unchanged"
6259
else
63-
run mv -f $1 $2
60+
msg "mv $1 $2"
61+
mv -f $1 $2
6462
chmod u-w $2 # make moved artifact read-only
6563
fi
6664
}
@@ -735,20 +733,6 @@ then
735733
probe CFG_JAVAC javac
736734
fi
737735

738-
# the valgrind rpass tests will fail if you don't have a valgrind, but they're
739-
# only disabled if you opt out.
740-
if [ -z "$CFG_VALGRIND" ]
741-
then
742-
# If the user has explicitly asked for valgrind tests, then fail
743-
if [ -n "$CFG_ENABLE_VALGRIND" ] && [ -n "$CFG_ENABLE_VALGRIND_PROVIDED" ]
744-
then
745-
err "No valgrind present, but valgrind tests explicitly requested"
746-
else
747-
CFG_DISABLE_VALGRIND_RPASS=1
748-
putvar CFG_DISABLE_VALGRIND_RPASS
749-
fi
750-
fi
751-
752736
if [ ! -z "$CFG_GDB" ]
753737
then
754738
# Store GDB's version
@@ -860,7 +844,7 @@ then
860844
CFG_OSX_GCC_VERSION=$("$CFG_GCC" --version 2>&1 | grep "Apple LLVM version")
861845
if [ $? -eq 0 ]
862846
then
863-
step_msg "on OS X >=10.9, forcing use of clang"
847+
step_msg "on OS X 10.9, forcing use of clang"
864848
CFG_ENABLE_CLANG=1
865849
else
866850
if [ $("$CFG_GCC" --version 2>&1 | grep -c ' 4\.[0-6]') -ne 0 ]; then

branches/stable/mk/dist.mk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ PKG_FILES := \
5252
doc \
5353
driver \
5454
etc \
55-
error-index-generator \
5655
$(foreach crate,$(CRATES),lib$(crate)) \
5756
libcollectionstest \
5857
libcoretest \

branches/stable/mk/main.mk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,6 @@ ifndef CFG_DISABLE_VALGRIND_RPASS
195195
$(info cfg: valgrind-rpass command set to $(CFG_VALGRIND))
196196
CFG_VALGRIND_RPASS :=$(CFG_VALGRIND)
197197
else
198-
$(info cfg: disabling valgrind run-pass tests)
199198
CFG_VALGRIND_RPASS :=
200199
endif
201200

branches/stable/src/compiletest/compiletest.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,15 +226,15 @@ pub fn run_tests(config: &Config) {
226226
}
227227

228228
// android debug-info test uses remote debugger
229-
// so, we test 1 thread at once.
229+
// so, we test 1 task at once.
230230
// also trying to isolate problems with adb_run_wrapper.sh ilooping
231231
env::set_var("RUST_TEST_THREADS","1");
232232
}
233233

234234
match config.mode {
235235
DebugInfoLldb => {
236236
// Some older versions of LLDB seem to have problems with multiple
237-
// instances running in parallel, so only run one test thread at a
237+
// instances running in parallel, so only run one test task at a
238238
// time.
239239
env::set_var("RUST_TEST_THREADS", "1");
240240
}

branches/stable/src/doc/complement-design-faq.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ code should need to run is a stack.
9696
possibility is covered by the `match`, adding further variants to the `enum`
9797
in the future will prompt a compilation failure, rather than runtime panic.
9898
Second, it makes cost explicit. In general, the only safe way to have a
99-
non-exhaustive match would be to panic the thread if nothing is matched, though
99+
non-exhaustive match would be to panic the task if nothing is matched, though
100100
it could fall through if the type of the `match` expression is `()`. This sort
101101
of hidden cost and special casing is against the language's philosophy. It's
102102
easy to ignore certain cases by using the `_` wildcard:

branches/stable/src/doc/complement-lang-faq.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,15 @@ Data values in the language can only be constructed through a fixed set of initi
6262
* There is no global inter-crate namespace; all name management occurs within a crate.
6363
* Using another crate binds the root of _its_ namespace into the user's namespace.
6464

65-
## Why is panic unwinding non-recoverable within a thread? Why not try to "catch exceptions"?
65+
## Why is panic unwinding non-recoverable within a task? Why not try to "catch exceptions"?
6666

67-
In short, because too few guarantees could be made about the dynamic environment of the catch block, as well as invariants holding in the unwound heap, to be able to safely resume; we believe that other methods of signalling and logging errors are more appropriate, with threads playing the role of a "hard" isolation boundary between separate heaps.
67+
In short, because too few guarantees could be made about the dynamic environment of the catch block, as well as invariants holding in the unwound heap, to be able to safely resume; we believe that other methods of signalling and logging errors are more appropriate, with tasks playing the role of a "hard" isolation boundary between separate heaps.
6868

6969
Rust provides, instead, three predictable and well-defined options for handling any combination of the three main categories of "catch" logic:
7070

7171
* Failure _logging_ is done by the integrated logging subsystem.
72-
* _Recovery_ after a panic is done by trapping a thread panic from _outside_
73-
the thread, where other threads are known to be unaffected.
72+
* _Recovery_ after a panic is done by trapping a task panic from _outside_
73+
the task, where other tasks are known to be unaffected.
7474
* _Cleanup_ of resources is done by RAII-style objects with destructors.
7575

7676
Cleanup through RAII-style destructors is more likely to work than in catch blocks anyways, since it will be better tested (part of the non-error control paths, so executed all the time).
@@ -91,8 +91,8 @@ We don't know if there's an obvious, easy, efficient, stock-textbook way of supp
9191

9292
There's a lot of debate on this topic; it's easy to find a proponent of default-sync or default-async communication, and there are good reasons for either. Our choice rests on the following arguments:
9393

94-
* Part of the point of isolating threads is to decouple threads from one another, such that assumptions in one thread do not cause undue constraints (or bugs, if violated!) in another. Temporal coupling is as real as any other kind; async-by-default relaxes the default case to only _causal_ coupling.
95-
* Default-async supports buffering and batching communication, reducing the frequency and severity of thread-switching and inter-thread / inter-domain synchronization.
94+
* Part of the point of isolating tasks is to decouple tasks from one another, such that assumptions in one task do not cause undue constraints (or bugs, if violated!) in another. Temporal coupling is as real as any other kind; async-by-default relaxes the default case to only _causal_ coupling.
95+
* Default-async supports buffering and batching communication, reducing the frequency and severity of task-switching and inter-task / inter-domain synchronization.
9696
* Default-async with transmittable channels is the lowest-level building block on which more-complex synchronization topologies and strategies can be built; it is not clear to us that the majority of cases fit the 2-party full-synchronization pattern rather than some more complex multi-party or multi-stage scenario. We did not want to force all programs to pay for wiring the former assumption into all communications.
9797

9898
## Why are channels half-duplex (one-way)?

branches/stable/src/doc/grammar.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ view_item : extern_crate_decl | use_decl ;
329329

330330
```antlr
331331
extern_crate_decl : "extern" "crate" crate_name
332-
crate_name: ident | ( ident "as" ident )
332+
crate_name: ident | ( string_lit as ident )
333333
```
334334

335335
##### Use declarations
@@ -789,8 +789,8 @@ bound := path | lifetime
789789

790790
### Boxes
791791

792-
## Threads
792+
## Tasks
793793

794-
### Communication between threads
794+
### Communication between tasks
795795

796-
### Thread lifecycle
796+
### Task lifecycle

branches/stable/src/doc/reference.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -752,10 +752,11 @@ provided in the `extern_crate_decl`.
752752
The external crate is resolved to a specific `soname` at compile time, and a
753753
runtime linkage requirement to that `soname` is passed to the linker for
754754
loading at runtime. The `soname` is resolved at compile time by scanning the
755-
compiler's library path and matching the optional `crateid` provided against
756-
the `crateid` attributes that were declared on the external crate when it was
757-
compiled. If no `crateid` is provided, a default `name` attribute is assumed,
758-
equal to the `ident` given in the `extern_crate_decl`.
755+
compiler's library path and matching the optional `crateid` provided as a
756+
string literal against the `crateid` attributes that were declared on the
757+
external crate when it was compiled. If no `crateid` is provided, a default
758+
`name` attribute is assumed, equal to the `ident` given in the
759+
`extern_crate_decl`.
759760

760761
Three examples of `extern crate` declarations:
761762

@@ -2028,7 +2029,7 @@ makes it possible to declare these operations. For example, the `str` module
20282029
in the Rust standard library defines the string equality function:
20292030

20302031
```{.ignore}
2031-
#[lang = "str_eq"]
2032+
#[lang="str_eq"]
20322033
pub fn eq_slice(a: &str, b: &str) -> bool {
20332034
// details elided
20342035
}
@@ -3635,7 +3636,7 @@ that have since been removed):
36353636
* ML Kit, Cyclone: region based memory management
36363637
* Haskell (GHC): typeclasses, type families
36373638
* Newsqueak, Alef, Limbo: channels, concurrency
3638-
* Erlang: message passing, thread failure, ~~linked thread failure~~,
3639+
* Erlang: message passing, task failure, ~~linked task failure~~,
36393640
~~lightweight concurrency~~
36403641
* Swift: optional bindings
36413642
* Scheme: hygienic macros
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
% Handling errors
22

3-
### Use thread isolation to cope with failure. [FIXME]
3+
### Use task isolation to cope with failure. [FIXME]
44

5-
> **[FIXME]** Explain how to isolate threads and detect thread failure for recovery.
5+
> **[FIXME]** Explain how to isolate tasks and detect task failure for recovery.
66
77
### Consuming `Result` [FIXME]

branches/stable/src/doc/style/errors/signaling.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ Errors fall into one of three categories:
1111
The basic principle of the convention is that:
1212

1313
* Catastrophic errors and programming errors (bugs) can and should only be
14-
recovered at a *coarse grain*, i.e. a thread boundary.
14+
recovered at a *coarse grain*, i.e. a task boundary.
1515
* Obstructions preventing an operation should be reported at a maximally *fine
1616
grain* -- to the immediate invoker of the operation.
1717

1818
## Catastrophic errors
1919

20-
An error is _catastrophic_ if there is no meaningful way for the current thread to
20+
An error is _catastrophic_ if there is no meaningful way for the current task to
2121
continue after the error occurs.
2222

2323
Catastrophic errors are _extremely_ rare, especially outside of `libstd`.
@@ -28,7 +28,7 @@ Catastrophic errors are _extremely_ rare, especially outside of `libstd`.
2828

2929
For errors like stack overflow, Rust currently aborts the process, but
3030
could in principle panic, which (in the best case) would allow
31-
reporting and recovery from a supervisory thread.
31+
reporting and recovery from a supervisory task.
3232

3333
## Contract violations
3434

@@ -44,7 +44,7 @@ existing borrows have been relinquished.
4444

4545
A contract violation is always a bug, and for bugs we follow the Erlang
4646
philosophy of "let it crash": we assume that software *will* have bugs, and we
47-
design coarse-grained thread boundaries to report, and perhaps recover, from these
47+
design coarse-grained task boundaries to report, and perhaps recover, from these
4848
bugs.
4949

5050
### Contract design

branches/stable/src/doc/style/ownership/builders.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ If `T` is such a data structure, consider introducing a `T` _builder_:
2323
4. The builder should provide one or more "_terminal_" methods for actually building a `T`.
2424

2525
The builder pattern is especially appropriate when building a `T` involves side
26-
effects, such as spawning a thread or launching a process.
26+
effects, such as spawning a task or launching a process.
2727

2828
In Rust, there are two variants of the builder pattern, differing in the
2929
treatment of ownership, as described below.
@@ -115,24 +115,24 @@ Sometimes builders must transfer ownership when constructing the final type
115115
`T`, meaning that the terminal methods must take `self` rather than `&self`:
116116

117117
```rust
118-
// A simplified excerpt from std::thread::Builder
118+
// A simplified excerpt from std::task::TaskBuilder
119119

120-
impl ThreadBuilder {
121-
/// Name the thread-to-be. Currently the name is used for identification
120+
impl TaskBuilder {
121+
/// Name the task-to-be. Currently the name is used for identification
122122
/// only in failure messages.
123-
pub fn named(mut self, name: String) -> ThreadBuilder {
123+
pub fn named(mut self, name: String) -> TaskBuilder {
124124
self.name = Some(name);
125125
self
126126
}
127127

128-
/// Redirect thread-local stdout.
129-
pub fn stdout(mut self, stdout: Box<Writer + Send>) -> ThreadBuilder {
128+
/// Redirect task-local stdout.
129+
pub fn stdout(mut self, stdout: Box<Writer + Send>) -> TaskBuilder {
130130
self.stdout = Some(stdout);
131131
// ^~~~~~ this is owned and cannot be cloned/re-used
132132
self
133133
}
134134

135-
/// Creates and executes a new child thread.
135+
/// Creates and executes a new child task.
136136
pub fn spawn(self, f: proc():Send) {
137137
// consume self
138138
...
@@ -141,7 +141,7 @@ impl ThreadBuilder {
141141
```
142142

143143
Here, the `stdout` configuration involves passing ownership of a `Writer`,
144-
which must be transferred to the thread upon construction (in `spawn`).
144+
which must be transferred to the task upon construction (in `spawn`).
145145

146146
When the terminal methods of the builder require ownership, there is a basic tradeoff:
147147

@@ -158,17 +158,17 @@ builder methods for a consuming builder should take and returned an owned
158158

159159
```rust
160160
// One-liners
161-
ThreadBuilder::new().named("my_thread").spawn(proc() { ... });
161+
TaskBuilder::new().named("my_task").spawn(proc() { ... });
162162

163163
// Complex configuration
164-
let mut thread = ThreadBuilder::new();
165-
thread = thread.named("my_thread_2"); // must re-assign to retain ownership
164+
let mut task = TaskBuilder::new();
165+
task = task.named("my_task_2"); // must re-assign to retain ownership
166166

167167
if reroute {
168-
thread = thread.stdout(mywriter);
168+
task = task.stdout(mywriter);
169169
}
170170

171-
thread.spawn(proc() { ... });
171+
task.spawn(proc() { ... });
172172
```
173173

174174
One-liners work as before, because ownership is threaded through each of the

branches/stable/src/doc/style/ownership/destructors.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ go out of scope.
88
99
### Destructors should not fail. [FIXME: needs RFC]
1010

11-
Destructors are executed on thread failure, and in that context a failing
11+
Destructors are executed on task failure, and in that context a failing
1212
destructor causes the program to abort.
1313

1414
Instead of failing in a destructor, provide a separate method for checking for

branches/stable/src/doc/style/style/comments.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
Use line comments:
66

77
``` rust
8-
// Wait for the main thread to return, and set the process error code
8+
// Wait for the main task to return, and set the process error code
99
// appropriately.
1010
```
1111

1212
Instead of:
1313

1414
``` rust
1515
/*
16-
* Wait for the main thread to return, and set the process error code
16+
* Wait for the main task to return, and set the process error code
1717
* appropriately.
1818
*/
1919
```
@@ -55,7 +55,7 @@ For example:
5555
/// Sets up a default runtime configuration, given compiler-supplied arguments.
5656
///
5757
/// This function will block until the entire pool of M:N schedulers has
58-
/// exited. This function also requires a local thread to be available.
58+
/// exited. This function also requires a local task to be available.
5959
///
6060
/// # Arguments
6161
///
@@ -64,7 +64,7 @@ For example:
6464
/// * `main` - The initial procedure to run inside of the M:N scheduling pool.
6565
/// Once this procedure exits, the scheduling pool will begin to shut
6666
/// down. The entire pool (and this function) will only return once
67-
/// all child threads have finished executing.
67+
/// all child tasks have finished executing.
6868
///
6969
/// # Return value
7070
///

branches/stable/src/doc/style/style/naming/containers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ they enclose. Accessor methods often have variants to access the data
55
by value, by reference, and by mutable reference.
66

77
In general, the `get` family of methods is used to access contained
8-
data without any risk of thread failure; they return `Option` as
8+
data without any risk of task failure; they return `Option` as
99
appropriate. This name is chosen rather than names like `find` or
1010
`lookup` because it is appropriate for a wider range of container types.
1111

0 commit comments

Comments
 (0)