diff --git a/imports.md b/imports.md
index 1ae5b12..faad09c 100644
--- a/imports.md
+++ b/imports.md
@@ -389,6 +389,9 @@ let _ = this.check-write(); // eliding error handling
check-write
permitted length and the len
provided to splice
write
on the output-stream
with that read data.This function behaves as-if these steps are performed atomically. +I.e. if the read (in step 2) succeeds, but the write (in step 3) fails, +future reads will first read from the buffer alread retrieved in step 2.
Any error reported by the call to check-write
, read
, or
write
ends the splice and reports that error.
This function returns the number of bytes transferred; it may be less diff --git a/wit/streams.wit b/wit/streams.wit index 6d2f871..a70c79f 100644 --- a/wit/streams.wit +++ b/wit/streams.wit @@ -235,6 +235,10 @@ interface streams { /// `check-write` permitted length and the `len` provided to `splice` /// 3. calling `write` on the `output-stream` with that read data. /// + /// This function behaves as-if these steps are performed atomically. + /// I.e. if the read (in step 2) succeeds, but the write (in step 3) fails, + /// future reads will first read from the buffer alread retrieved in step 2. + /// /// Any error reported by the call to `check-write`, `read`, or /// `write` ends the splice and reports that error. ///