@@ -211,17 +211,18 @@ attempts to exit.
211
211
### Streams and Futures
212
212
213
213
Streams and Futures have two "ends": a * readable end* and * writable end* . When
214
- * consuming* a ` stream ` or ` future ` value as a parameter (of an export call
215
- with a ` stream ` or ` future ` somewhere in the parameter types) or result (of an
214
+ * consuming* a ` stream ` or ` future ` value as a parameter (of an export call with
215
+ a ` stream ` or ` future ` somewhere in the parameter types) or result (of an
216
216
import call with a ` stream ` or ` future ` somewhere in the result type), the
217
217
receiver always gets * unique ownership* of the * readable end* of the ` stream `
218
218
or ` future ` . When * producing* a ` stream ` or ` future ` value as a parameter (of
219
219
an import call) or result (of an export call), the producer can either
220
- * transfer ownership* of a readable end it has already received or it can
221
- create a fresh writable end (via ` stream.new ` or ` future.new ` ) and lift this
222
- writable end (maintaining ownership of the writable end, but creating a fresh
223
- readable end for the receiver). To maintain the invariant that readable ends
224
- are unique, a writable end can be lifted at most once, trapping otherwise.
220
+ * transfer ownership* of a readable end it has already received or it can create
221
+ a fresh writable end (via ` stream.new ` or ` future.new ` ) and then lift this
222
+ writable end to create a fresh readable end in the consumer while maintaining
223
+ ownership of the writable end in the producer. To maintain the invariant that
224
+ readable ends are unique, a writable end can be lifted at most once, trapping
225
+ otherwise.
225
226
226
227
Based on this, ` stream<T> ` and ` future<T> ` values can be passed between
227
228
functions as if they were synchronous ` list<T> ` and ` T ` values, resp. For
0 commit comments