diff --git a/src/core/moonpool.mli b/src/core/moonpool.mli index 9958efd3..a992e8b8 100644 --- a/src/core/moonpool.mli +++ b/src/core/moonpool.mli @@ -37,6 +37,7 @@ val run_async : ?fiber:Picos.Fiber.t -> Runner.t -> (unit -> unit) -> unit (** [run_async runner task] schedules the task to run on the given runner. This means [task()] will be executed at some point in the future, possibly in another thread. + @param fiber optional initial (picos) fiber state @since 0.5 *) val run_wait_block : ?fiber:Picos.Fiber.t -> Runner.t -> (unit -> 'a) -> 'a @@ -46,6 +47,8 @@ val run_wait_block : ?fiber:Picos.Fiber.t -> Runner.t -> (unit -> 'a) -> 'a and returns its result. If [f()] raises an exception, then [run_wait_block pool f] will raise it as well. + See {!run_async} for more details. + {b NOTE} be careful with deadlocks (see notes in {!Fut.wait_block} about the required discipline to avoid deadlocks). @raise Shutdown if the runner was already shut down diff --git a/src/core/runner.mli b/src/core/runner.mli index d8c0ea0a..958c8598 100644 --- a/src/core/runner.mli +++ b/src/core/runner.mli @@ -38,7 +38,7 @@ val run_async : ?fiber:fiber -> t -> task -> unit (** [run_async pool f] schedules [f] for later execution on the runner in one of the threads. [f()] will run on one of the runner's worker threads/domains. - @param ls if provided, run the task with this initial local storage + @param fiber if provided, run the task with this initial fiber data @raise Shutdown if the runner was shut down before [run_async] was called. *) val run_wait_block : ?fiber:fiber -> t -> (unit -> 'a) -> 'a diff --git a/src/core/worker_loop_.ml b/src/core/worker_loop_.ml index df99e169..b28ef42b 100644 --- a/src/core/worker_loop_.ml +++ b/src/core/worker_loop_.ml @@ -89,7 +89,7 @@ let with_handler (type st arg) ~(ops : st ops) (self : st) : Some (fun k -> (* not implemented *) - let exn = Failure "Moonpool: cancel_after is not implemented" in + let exn = Failure "Moonpool: cancel_after is not supported." in discontinue k exn) | _ -> None in diff --git a/src/core/ws_pool.ml b/src/core/ws_pool.ml index 5be467fa..6709e08a 100644 --- a/src/core/ws_pool.ml +++ b/src/core/ws_pool.ml @@ -16,7 +16,7 @@ end type state = { id_: Id.t; - (** Unique per pool. Used to make sure tasks stay within the same pool. *) + (** Unique to this pool. Used to make sure tasks stay within the same pool. *) active: bool A.t; (** Becomes [false] when the pool is shutdown. *) mutable workers: worker_state array; (** Fixed set of workers. *) main_q: WL.task_full Queue.t;