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

Expose enif_is_process_alive #540

Closed
zachallaun opened this issue May 24, 2023 · 4 comments
Closed

Expose enif_is_process_alive #540

zachallaun opened this issue May 24, 2023 · 4 comments

Comments

@zachallaun
Copy link

zachallaun commented May 24, 2023

Happy to take a shot at adding this if there are no objections.

Edit: just saw #44, where both this and enif_is_current_process_alive are mentioned.

@filmor
Copy link
Member

filmor commented May 24, 2023

The function is already in rustler_sys, you just need to add a function on Env in the local_pid module (like the existing pid() function there).

@zachallaun
Copy link
Author

zachallaun commented May 26, 2023

Want to make sure I understand the project structure correctly — would you implement is_process_alive and is_current_process_alive here that operate on the underlying types, and then create the public interface that uses those wrappers here? So when writing a nif you’d use:

env.is_current_process_alive();
env.is_process_alive(pid);

// or should it be
pid.is_process_alive(env);

@filmor
Copy link
Member

filmor commented Sep 17, 2023

Sorry for the late reply. I think I'd like all of these, where of course pid.is_process_alive could just redirect to the implementation on env.

@filmor
Copy link
Member

filmor commented Mar 12, 2024

Implemented in #599, will be in the next release.

@filmor filmor closed this as completed Mar 12, 2024
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

2 participants