-
-
Notifications
You must be signed in to change notification settings - Fork 547
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
<parameter name> is not defined #1109
Comments
It looks like this might be a symptom of using the JINT engine across multiple threads. When I changed the above setTimeout implementation to be on the main thread - the issue doesn't occur. Just wanted to call that out since I think we can restrict our usage of each Engine to a single thread. |
Jint is by design not thread-safe, so "odd things happening" might stem with multi-threaded usage. |
As a way to give a "fail early, fail fast" exception - I've created a PR with a "thread check": I'm happy to put this "thread safety" check behind an optional config when you initialize the Engine if this seems overly precautious. |
I've added API documentation on Engine level and in main README in #1489 to highlight the fact that engine is not thread-safe. The PR can be used for possible development, but as noted in #1110 (comment) it's not very simple to implement correctly. Easiest path probably to make things evident enough via docs etc the same way like .NET's |
Discussed in #1108
Originally posted by source-transformer March 17, 2022
JINT will sometimes fail with a JavaScriptException
There is a unit test that replicates this failure.
The text was updated successfully, but these errors were encountered: