Skip to content

Commit ac45e60

Browse files
committed
Clarify behavior when dropping an active output-stream
1 parent cc5ea50 commit ac45e60

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

wit/streams.wit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,10 @@ interface streams {
102102
/// promptly, which could even be zero. To wait for the stream to be ready to
103103
/// accept data, the `subscribe` function to obtain a `pollable` which can be
104104
/// polled for using `wasi:io/poll`.
105+
///
106+
/// Dropping an `output-stream` while there's still an active write in
107+
/// progress may result in the data being lost. Before dropping the stream,
108+
/// be sure to fully flush your writes.
105109
resource output-stream {
106110
/// Check readiness for writing. This function never blocks.
107111
///

0 commit comments

Comments
 (0)