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

Add supervisor:which_child/2 #8976

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Maria-12648430
Copy link
Contributor

Sometimes I have the need to obtain the Pid of a certain supervisor child. This often happens when the children form a work unit of cooperating processes, wherein one needs to talk to another.
To obtain such a Pid, currently I have to use which_children/1 to obtain a list of all children, then filter out the one I need, which is boilerplate code repeated over and over.

This PR adds a function which_child/2, which can be used to obtain the same information as which_children/1 does, but for a particular single child.

Copy link
Contributor

github-actions bot commented Oct 22, 2024

CT Test Results

    2 files     96 suites   1h 6m 3s ⏱️
2 161 tests 2 113 ✅ 48 💤 0 ❌
2 520 runs  2 470 ✅ 50 💤 0 ❌

Results for commit a9a9a78.

♻️ This comment has been updated with latest results.

To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass.

See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally.

Artifacts

// Erlang/OTP Github Action Bot

@u3s u3s added the team:PS Assigned to OTP team PS label Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team:PS Assigned to OTP team PS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants