Skip to content

Do new pools "own" the current domain? #77

Open
@favonia

Description

@favonia

I could not tell whether a newly created pool "owns" the current domain. In one of the test files, there are consecutive calls to setup_pool:

let pool1 = Task.setup_pool ~num_additional_domains:2 ~name:"pool1" () in
let pool2 = Task.setup_pool ~num_additional_domains:2 ~name:"pool2" () in

Therefore, it seems okay to have multiple pools sharing the same domain (that is, the current domain). However, the documentation gave me the impression that I have to manually spawn new domains before setting up pools to avoid overlapping:

domainslib/lib/task.mli

Lines 10 to 13 in 15f04f3

val setup_pool : ?name:string -> num_additional_domains:int -> unit -> pool
(** Sets up a task execution pool with [num_additional_domains + 1] domains
including the current domain. If [name] is provided, the pool is mapped to
[name] which can be looked up later with [lookup_pool name].

I wonder what is the intended semantics? What is the ownership relation between pools and domains? This might be related to #55.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions