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

C API: Re-expose GC_allow_register_threads #10636

Open
roberth opened this issue May 2, 2024 · 0 comments
Open

C API: Re-expose GC_allow_register_threads #10636

roberth opened this issue May 2, 2024 · 0 comments
Labels
c api Nix as a C library with a stable interface feature Feature request or proposal

Comments

@roberth
Copy link
Member

roberth commented May 2, 2024

Is your feature request related to a problem? Please describe.

The Rust bindings use GC_allow_register_threads and GC_register_my_thread/GC_unregister_my_thread to make its unit tests work (avoid "collecting from unknown thread").

This limits the usefulness of the bindings in case of future versions or alternate implementations.

Describe the solution you'd like

Bdwgc is an implementation detail, so the C API should provide what are effectively wrappers for those functions, so that we don't restrict Nix when it comes to the choice of GC.

Document the problem solved by these functions.

Apply to the Rust bindings for validation:

-#include <gc/gc.h>

Describe alternatives you've considered

Additional context

Priorities

Add 👍 to issues you find important.

@roberth roberth added feature Feature request or proposal c api Nix as a C library with a stable interface labels May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c api Nix as a C library with a stable interface feature Feature request or proposal
Projects
None yet
Development

No branches or pull requests

1 participant