diff --git a/src/fib/fiber.ml b/src/fib/fiber.ml index bedfa0e7..d9f16b1e 100644 --- a/src/fib/fiber.ml +++ b/src/fib/fiber.ml @@ -303,6 +303,7 @@ let spawn ?on ?(protect = true) f : _ t = child let[@inline] spawn_ignore ?protect f : unit = ignore (spawn ?protect f : _ t) +let[@inline] spawn_top_ignore ~on f : unit = ignore (spawn_top ~on f : _ t) let[@inline] self () : any = match get_cur_exn () with diff --git a/src/fib/fiber.mli b/src/fib/fiber.mli index 0da300e7..87f4021e 100644 --- a/src/fib/fiber.mli +++ b/src/fib/fiber.mli @@ -147,3 +147,7 @@ val spawn_ignore : ?protect:bool -> (unit -> _) -> unit (** [spawn_ignore f] is [ignore (spawn f)]. The fiber will still affect termination of the parent, ie. the parent will exit only after this new fiber exits. *) + +val spawn_top_ignore : on:Runner.t -> (unit -> _) -> unit +(** Like {!spawn_top} but ignores the result. + @since NEXT_RELEASE *)