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

Thread-safety of C node API #540

Open
phil-opp opened this issue Jun 7, 2024 · 0 comments
Open

Thread-safety of C node API #540

phil-opp opened this issue Jun 7, 2024 · 0 comments
Labels
documentation Improvements or additions to documentation

Comments

@phil-opp
Copy link
Collaborator

phil-opp commented Jun 7, 2024

We should clearly document, which parts of the C node API are thread-safe and which not. Also, we should try to make more functions thread-safe, if possible.

Example: The dora_next_event function casts the given context pointer to a &mut DoraContext in Rust, which must be an exclusive reference. So calling the function concurrently with the same context pointer violates this requirement and leads to undefined behavior. However, the underlying flume channel supports receiving elements through shared references, so we might be able to make dora_next_event thread-safe.

@github-actions github-actions bot added the documentation Improvements or additions to documentation label Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant