File tree 2 files changed +9
-2
lines changed 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -133,12 +133,15 @@ use the <code>subscribe</code> function to obtain a <a href="#pollable"><code>po
133
133
for using <code >wasi: io /poll</code >.</p >
134
134
<h4 ><a name =" output_stream " ></a ><code >resource output-stream</code ></h4 >
135
135
<p >An output bytestream.</p >
136
- <h2 ><a href =" #output_stream " ><code >output-stream</code ></a >s are <em >non-blocking</em > to the extent practical on
136
+ <p ><a href =" #output_stream " ><code >output-stream</code ></a >s are <em >non-blocking</em > to the extent practical on
137
137
underlying platforms. Except where specified otherwise, I/O operations also
138
138
always return promptly, after the number of bytes that can be written
139
139
promptly, which could even be zero. To wait for the stream to be ready to
140
140
accept data, the <code >subscribe</code > function to obtain a <a href =" #pollable " ><code >pollable</code ></a > which can be
141
- polled for using <code >wasi: io /poll</code >.</h2 >
141
+ polled for using <code >wasi: io /poll</code >.</p >
142
+ <h2 >Dropping an <a href =" #output_stream " ><code >output-stream</code ></a > while there's still an active write in
143
+ progress may result in the data being lost. Before dropping the stream,
144
+ be sure to fully flush your writes.</h2 >
142
145
<h3 >Functions</h3 >
143
146
<h4 ><a name =" method_input_stream_read " ></a ><code >[method]input-stream.read: func</code ></h4 >
144
147
<p >Perform a non-blocking read from the stream.</p >
Original file line number Diff line number Diff line change @@ -112,6 +112,10 @@ interface streams {
112
112
/// promptly, which could even be zero. To wait for the stream to be ready to
113
113
/// accept data, the `subscribe` function to obtain a `pollable` which can be
114
114
/// polled for using `wasi:io/poll` .
115
+ ///
116
+ /// Dropping an `output-stream` while there's still an active write in
117
+ /// progress may result in the data being lost. Before dropping the stream,
118
+ /// be sure to fully flush your writes.
115
119
@since(version = 0.2.0)
116
120
resource output-stream {
117
121
/// Check readiness for writing. This function never blocks.
You can’t perform that action at this time.
0 commit comments