From 270c7fe66f864c796e73eb8da89669770ef6419a Mon Sep 17 00:00:00 2001 From: c-cube Date: Tue, 5 Mar 2024 02:05:14 +0000 Subject: [PATCH] deploy: 3bdd269ca35799d081c4e0cc6c6454299f947bc7 --- moonpool/Moonpool_dpool/index.html | 2 ++ moonpool/index.html | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 moonpool/Moonpool_dpool/index.html diff --git a/moonpool/Moonpool_dpool/index.html b/moonpool/Moonpool_dpool/index.html new file mode 100644 index 00000000..a26ad039 --- /dev/null +++ b/moonpool/Moonpool_dpool/index.html @@ -0,0 +1,2 @@ + +Moonpool_dpool (moonpool.Moonpool_dpool)

Module Moonpool_dpool

Static pool of domains.

These domains are shared between all the pools in moonpool. The rationale is that we should not have more domains than cores, so it's easier to reserve exactly that many domain slots, and run more flexible thread pools on top (each domain being shared by potentially multiple threads from multiple pools).

The pool should not contain actual domains if it's not in use, ie if no runner is presently actively using one or more of the domain slots.

NOTE: Interface is still experimental.

val max_number_of_domains : unit -> int

Number of domains in the pool when all domains are active.

Low level interface for resouce handling

Be very cautious with this interface, or resource leaks might occur.

val run_on : int -> (unit -> unit) -> unit

run_on i f runs f() on the domain with index i. Precondition: 0 <= i < n_domains(). The thread must call decr_on with i once it's done.

val decr_on : int -> unit

Signal that a thread is stopping on the domain with index i.

val run_on_and_wait : int -> (unit -> 'a) -> 'a

run_on_and_wait i f runs f() on the domain with index i, and blocks until the result of f() is returned back.

diff --git a/moonpool/index.html b/moonpool/index.html index b4548584..1923a877 100644 --- a/moonpool/index.html +++ b/moonpool/index.html @@ -1,2 +1,2 @@ -index (moonpool.index)

Package moonpool

Package info

changes-files
readme-files
+index (moonpool.index)

Package moonpool

Package info

changes-files
readme-files