File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,12 @@ let () = Lwt_main.run (main ())
40
40
error (i.e., code making such a call is inherently broken).
41
41
42
42
It is not safe to call [Lwt_main.run] in a function registered with
43
- [Pervasives.at_exit], use {!Lwt_main.at_exit} instead. *)
43
+ [Pervasives.at_exit], use {!Lwt_main.at_exit} instead.
44
+
45
+ [Lwt.pause] allows the scheduler to run other promises before fulfilling
46
+ the returned promise. To process all pending IO and allow all pending
47
+ threads to run one currently needs to need to call Lwt.pause twice:
48
+ [Lwt.pause () >>= Lwt.pause] *)
44
49
45
50
val yield : unit -> unit Lwt .t [@@ deprecated "Use Lwt.pause instead" ]
46
51
(* * [yield ()] is a pending promise that is fulfilled after Lwt finishes
You can’t perform that action at this time.
0 commit comments