rename no_runner to immediate_runner

This commit is contained in:
Simon Cruanes 2023-10-28 12:48:41 -04:00
parent 703ffde303
commit 22624441fd
No known key found for this signature in database
GPG key ID: EBFFF6F283F3A2B4
5 changed files with 22 additions and 8 deletions

20
src/immediate_runner.mli Normal file
View file

@ -0,0 +1,20 @@
(** Runner that runs tasks immediately in the caller thread.
Whenever a task is submitted to this runner via [Runner.run_async r task],
the task is run immediately in the caller thread as [task()].
There are no background threads, no resource, this is just a trivial
implementation of the interface.
This can be useful when an implementation needs a runner, but there isn't
enough work to justify starting an actual full thread pool.
Another situation is when threads cannot be used at all (e.g. because you
plan to call [Unix.fork] later).
@since NEXT_RELEASE
*)
include module type of Runner
val runner : t
(** The trivial runner that actually runs tasks at the calling point. *)

View file

@ -13,7 +13,7 @@ module Fifo_pool = Fifo_pool
module Fork_join = Fork_join
module Fut = Fut
module Lock = Lock
module No_runner = No_runner
module Immediate_runner = Immediate_runner
module Pool = Fifo_pool
module Runner = Runner
module Thread_local_storage = Thread_local_storage

View file

@ -12,7 +12,7 @@
module Ws_pool = Ws_pool
module Fifo_pool = Fifo_pool
module Runner = Runner
module No_runner = No_runner
module Immediate_runner = Immediate_runner
module Pool = Fifo_pool
[@@deprecated "use Fifo_pool or Ws_pool to be more explicit"]

View file

@ -1,6 +0,0 @@
(** Runner that runs in the caller, not in the background. *)
include module type of Runner
val runner : t
(** The trivial runner that actually runs tasks at the calling point. *)