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

API synchronization #225

Merged
merged 11 commits into from
Oct 23, 2023
Merged

Conversation

qzhuyan
Copy link
Collaborator

@qzhuyan qzhuyan commented Oct 20, 2023

fix: follow up thread safe API in #222

Changes in #222 decouples the ctx lifetime and handle lifetime that the C handle life can be shorter than ctx thus we must have some synchronization in APIs. We use refcnt for tracking the lifetime of the C handle and use mutex for protecting critical section.

@qzhuyan qzhuyan force-pushed the dev/william/nif-module-reload branch from fdf39fd to bdc66c8 Compare October 21, 2023 19:18
@qzhuyan qzhuyan force-pushed the dev/william/nif-module-reload branch from bdc66c8 to 97979b5 Compare October 23, 2023 07:31
@qzhuyan qzhuyan changed the title Dev/william/nif module reload API synchronization Oct 23, 2023
@qzhuyan qzhuyan marked this pull request as ready for review October 23, 2023 07:38
@qzhuyan qzhuyan self-assigned this Oct 23, 2023
@qzhuyan qzhuyan merged commit 9cfccfa into emqx:main Oct 23, 2023
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants