Skip to content

Commit

Permalink
Clarify behavior when dropping an active output-stream
Browse files Browse the repository at this point in the history
  • Loading branch information
badeend committed Jun 27, 2024
1 parent cc5ea50 commit ac45e60
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions wit/streams.wit
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ interface streams {
/// promptly, which could even be zero. To wait for the stream to be ready to
/// accept data, the `subscribe` function to obtain a `pollable` which can be
/// polled for using `wasi:io/poll`.
///
/// Dropping an `output-stream` while there's still an active write in
/// progress may result in the data being lost. Before dropping the stream,
/// be sure to fully flush your writes.
resource output-stream {
/// Check readiness for writing. This function never blocks.
///
Expand Down

0 comments on commit ac45e60

Please sign in to comment.