Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calling instantaneous_domain_index () may fail during at_exit processing #12

Open
polytypic opened this issue Apr 2, 2024 · 0 comments

Comments

@polytypic
Copy link
Collaborator

polytypic commented Apr 2, 2024

Currently instantaneous_domain_index () raises an exception in case the domain on which the call is made is in the process of exiting. This should not normally cause problems, but can be problematic during both Stdlib.at_exit and Domain.at_exit processing.

The reason for this behavior is the need to keep track of how many domains exist. The mechanism registers a Domain.at_exit action that reduces the count of domains so that optimal and correct indices can be returned.

polytypic added a commit to ocaml-multicore/picos that referenced this issue Jun 3, 2024
See: ocaml-multicore/multicore-magic#12

By getting the index at `create` the `Domain.at_exit` cleanup is hopefully
allocated early enough.
polytypic added a commit to ocaml-multicore/picos that referenced this issue Jun 3, 2024
See: ocaml-multicore/multicore-magic#12

By getting the index at `create` the `Domain.at_exit` cleanup is hopefully
allocated early enough.
polytypic added a commit to ocaml-multicore/picos that referenced this issue Jun 3, 2024
See: ocaml-multicore/multicore-magic#12

By getting the index at `create` the `Domain.at_exit` cleanup is hopefully
registered early enough.
polytypic added a commit to ocaml-multicore/picos that referenced this issue Jun 3, 2024
See: ocaml-multicore/multicore-magic#12

By getting the index at `create` the `Domain.at_exit` cleanup is hopefully
registered early enough.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant