File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed
Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -306,6 +306,8 @@ let spawn_lwt f : _ Lwt.t =
306306 with exn -> Lwt. wakeup_exn lwt_prom exn );
307307 lwt_fut
308308
309+ let spawn_lwt_ignore f = ignore (spawn_lwt f : unit Lwt.t )
310+
309311let lwt_main (f : _ -> 'a ) : 'a =
310312 let st = setup () in
311313 (* make sure to cleanup *)
Original file line number Diff line number Diff line change @@ -27,6 +27,9 @@ val spawn_lwt : (unit -> 'a) -> 'a Lwt.t
2727(* * This spawns a task that runs in the Lwt scheduler.
2828 @raise Failure if {!lwt_main} was not called. *)
2929
30+ val spawn_lwt_ignore : (unit -> unit ) -> unit
31+ (* * Like {!spawn_lwt} but ignores the result, like [Lwt.async]. *)
32+
3033val await_lwt : 'a Lwt .t -> 'a
3134(* * [await_lwt fut] awaits a Lwt future from inside a task running on a moonpool
3235 runner. This must be run from within a Moonpool runner so that the await-ing
You can’t perform that action at this time.
0 commit comments