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

RJS-2854: Adding a ThreadSafeFunction-based scheduler for Core on Node.js #6800

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

kraenhansen
Copy link
Member

@kraenhansen kraenhansen commented Jul 19, 2024

What, How & Why?

This closes #6772 by implementing a utils::Scheduler based on the Napi::ThreadSafeFunction primitive.

Note: In order for the uncaught exceptions thrown by the Node.js addon, the node process must be started with a --force-node-api-uncaught-exceptions-policy flag enabled. This was added under a flag to "not breaking existing running Node-API add-ons.".

https://github.com/nodejs/node/blob/cd39578e53d6502de03f15620d15835b86954ac8/src/node_api.cc#L85-L115

Alternatively the following warning will be logged:

(node:17922) [DEP0168] DeprecationWarning: Uncaught N-API callback exception detected, please run node with option --force-node-api-uncaught-exceptions-policy=true to handle those exceptions properly.

☑️ ToDos

@kraenhansen
Copy link
Member Author

I thought my implementation was done, but it turns out tests were still failing 🤔 This is likely never going to get merged.

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.

Refactor throwing uncaught exceptions from callbacks dispatched onto the event loop from C++
1 participant