Skip to content

Commit 7145d61

Browse files
Apply suggestions from code review
Co-authored-by: Raphaël Proust <raphael-proust@users.noreply.github.com>
1 parent cd0e502 commit 7145d61

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/direct/lwt_direct.mli

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,13 @@ val run_in_the_background :
2323

2424
val yield : unit -> unit
2525
(** Yield to the event loop.
26-
Can only be used inside {!run} or {!run_in_the_background}. *)
26+
calling [yield] outside of {!run} or {!run_in_the_background} will raise an exception,
27+
crash your program, or otherwise cause errors. It is a programming error to do so. *)
2728

2829
val await : 'a Lwt.t -> 'a
2930
(** [await prom] returns the result of [prom], or re-raises the
3031
exception with which [prom] failed if it failed.
3132
If [prom] is not resolved yet, [await prom] will suspend the
3233
current task and resume it when [prom] is resolved.
33-
Can only be used inside {!run} or {!run_in_the_background}. *)
34+
calling [yield] outside of {!run} or {!run_in_the_background} will raise an exception,
35+
crash your program, or otherwise cause errors. It is a programming error to do so. *)

0 commit comments

Comments
 (0)