From 65bc3c97ff2f79f9e049138fba7689607b07632f Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Thu, 5 Sep 2024 09:33:54 -0400 Subject: [PATCH] alias for get_current_runner --- src/core/moonpool.ml | 1 + src/core/moonpool.mli | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/src/core/moonpool.ml b/src/core/moonpool.ml index 47e5e5e3..02a2d009 100644 --- a/src/core/moonpool.ml +++ b/src/core/moonpool.ml @@ -8,6 +8,7 @@ let start_thread_on_some_domain f x = let run_async = Runner.run_async let run_wait_block = Runner.run_wait_block +let get_current_runner = Runner.get_current_runner let recommended_thread_count () = Domain_.recommended_number () let spawn = Fut.spawn let spawn_on_current_runner = Fut.spawn_on_current_runner diff --git a/src/core/moonpool.mli b/src/core/moonpool.mli index a992e8b8..eb459cb9 100644 --- a/src/core/moonpool.mli +++ b/src/core/moonpool.mli @@ -69,6 +69,10 @@ val spawn_on_current_runner : (unit -> 'a) -> 'a Fut.t (** See {!Fut.spawn_on_current_runner}. @since 0.5 *) +val get_current_runner : unit -> Runner.t option +(** See {!Runner.get_current_runner} + @since NEXT_RELEASE *) + [@@@ifge 5.0] val await : 'a Fut.t -> 'a