mirror of
https://github.com/c-cube/moonpool.git
synced 2025-12-06 11:15:38 -05:00
rename no_runner to immediate_runner
This commit is contained in:
parent
703ffde303
commit
22624441fd
5 changed files with 22 additions and 8 deletions
20
src/immediate_runner.mli
Normal file
20
src/immediate_runner.mli
Normal 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. *)
|
||||||
|
|
@ -13,7 +13,7 @@ module Fifo_pool = Fifo_pool
|
||||||
module Fork_join = Fork_join
|
module Fork_join = Fork_join
|
||||||
module Fut = Fut
|
module Fut = Fut
|
||||||
module Lock = Lock
|
module Lock = Lock
|
||||||
module No_runner = No_runner
|
module Immediate_runner = Immediate_runner
|
||||||
module Pool = Fifo_pool
|
module Pool = Fifo_pool
|
||||||
module Runner = Runner
|
module Runner = Runner
|
||||||
module Thread_local_storage = Thread_local_storage
|
module Thread_local_storage = Thread_local_storage
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
module Ws_pool = Ws_pool
|
module Ws_pool = Ws_pool
|
||||||
module Fifo_pool = Fifo_pool
|
module Fifo_pool = Fifo_pool
|
||||||
module Runner = Runner
|
module Runner = Runner
|
||||||
module No_runner = No_runner
|
module Immediate_runner = Immediate_runner
|
||||||
|
|
||||||
module Pool = Fifo_pool
|
module Pool = Fifo_pool
|
||||||
[@@deprecated "use Fifo_pool or Ws_pool to be more explicit"]
|
[@@deprecated "use Fifo_pool or Ws_pool to be more explicit"]
|
||||||
|
|
|
||||||
|
|
@ -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. *)
|
|
||||||
Loading…
Add table
Reference in a new issue