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

Migrate to napi threadsafe functions #146

Merged
merged 13 commits into from
Jul 30, 2023
Merged

Conversation

devongovett
Copy link
Member

This will enable the watcher to be used from multiple node worker threads. It also removes the last remaining direct usage of libuv, which should enable other implementations such as Deno and Bun to potentially work (I have not tested this). Fixes #96. The code is actually quite a bit simpler and more straightforward to understand now too by passing data to the callback directly rather than storing it in the watcher instance and needing a bunch of extra locks.

@devongovett devongovett marked this pull request as ready for review July 30, 2023 03:08
@devongovett devongovett merged commit 9b7c657 into master Jul 30, 2023
@devongovett devongovett deleted the threadsafe-function branch July 30, 2023 03:35
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

Successfully merging this pull request may close these issues.

Replace libuv usage with napi_async_work?
1 participant