Skip to content

Commit ff2b7c9

Browse files
committed
---
yaml --- r: 7727 b: refs/heads/snap-stage3 c: 04351a8 h: refs/heads/master i: 7725: 3352604 7723: 1b25232 7719: b795a96 7711: dfbf04b v: v3
1 parent 44f4e3e commit ff2b7c9

File tree

2 files changed

+21
-17
lines changed

2 files changed

+21
-17
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
refs/heads/master: 2898dcc5d97da9427ac367542382b6239d9c0bbf
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: ef941998bea47c601adbb4af03beda98412aee6d
4+
refs/heads/snap-stage3: 04351a84ca342f4580e40b9c195b5403b864090b
55
refs/heads/try: 2898dcc5d97da9427ac367542382b6239d9c0bbf
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

branches/snap-stage3/src/libcore/comm.rs

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,25 @@
11
#[doc(
22
brief = "Communication between tasks",
3-
desc = "Communication between tasks is facilitated by ports (in the \
4-
receiving task), and channels (in the sending task). Any \
5-
number of channels may feed into a single port. \
6-
Ports and channels may only transmit values of unique \
7-
types; that is, values that are statically guaranteed to \
8-
be accessed by a single 'owner' at a time. Unique types \
9-
include scalars, vectors, strings, and records, tags, \
10-
tuples and unique boxes (~T) thereof. Most notably, \
11-
shared boxes (@T) may not be transmitted across channels. \
12-
Example: \
13-
let p = comm::port(); \
14-
task::spawn(comm::chan(p), fn (c: chan<str>) { \
15-
comm::send(c, \"Hello, World\"); \
16-
}); \
17-
io::println(comm::recv(p));"
18-
)];
3+
desc = "
4+
5+
Communication between tasks is facilitated by ports (in the receiving
6+
task), and channels (in the sending task). Any number of channels may
7+
feed into a single port. Ports and channels may only transmit values
8+
of unique types; that is, values that are statically guaranteed to be
9+
accessed by a single 'owner' at a time. Unique types include scalars,
10+
vectors, strings, and records, tags, tuples and unique boxes (`~T`)
11+
thereof. Most notably, shared boxes (`@T`) may not be transmitted
12+
across channels.
13+
14+
Example:
15+
16+
let p = comm::port();
17+
task::spawn(comm::chan(p), fn (c: chan<str>) {
18+
comm::send(c, \"Hello, World\");
19+
});
20+
io::println(comm::recv(p));
21+
22+
")];
1923

2024
import sys;
2125
import task;

0 commit comments

Comments
 (0)