package domainpc
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=837943f5a5932f1b27e26b236ce84b72379dea5f6f0212a65213ec403d23e62e
sha512=4ac175f6369d625b1927f48611340cbb6abc015608dda6f28895b7babba52c51f3cf81e9e41619febae176dc1d9b814f8dba9098ae8307ce4779dcf3353338bd
doc/domainpc/Domainpc/index.html
Module DomainpcSource
wait_on_unavailable () when all cores are used and more are requested, wait for cores to be freed instead of crashing.
get_available_cores () returns the number of available cores.
isolate_current () ensures that the current domain (usually the main one) is restricted to run on a core where other isolated domains can't run.
spawn ?isolated f if isolated is true spawns a domain that runs on a given core, otherwise behaves as Domain.spawn.
isolated is true by default.
spawn_n ?isolated ?n f if isolated is true, n is provided and is less than or equal to the number of free physical cores, spawns n new domains. If n is not provided and there is at least one free physical core, spawns as many domains as there are physical cores.
If isolated is false, the spawned domains are not guaranteed to run on separate cores.
isolated is true by default.