File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed
Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -203,6 +203,7 @@ let flush_buffer t =
203203 end
204204
205205let flush t f =
206+ t.yield < - false ;
206207 flush_buffer t;
207208 if Buffers. is_empty t.scheduled then f ()
208209 else Flushes. enqueue (t.bytes_received, f) t.flushed
Original file line number Diff line number Diff line change @@ -215,7 +215,9 @@ val yield : t -> unit
215215val flush : t -> (unit -> unit ) -> unit
216216(* * [flush t f] registers [f] to be called when all prior writes have been
217217 successfully completed. If [t] has no pending writes, then [f] will be
218- called immediately. *)
218+ called immediately. If {!yield} was recently called on [t], then the effect
219+ of the [yield] will be ignored so that client code has an opportunity to
220+ write pending output, regardless of how it handles [`Yield] operations. *)
219221
220222val close : t -> unit
221223(* * [close t] closes [t]. All subsequent write calls will raise, and any
You can’t perform that action at this time.
0 commit comments