-
Notifications
You must be signed in to change notification settings - Fork 81
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
About Thread Long Runs #123
Comments
Thank you for raising this issue! What do you think could be a good solution to this? I guess a workaround would be to spawn new threads? And otherwise probably calculate execution time delta? |
Thanks for your answer, I'm not sure if the problem exists or if I'm using it incorrectly, I've tried to use new threads, but this will increase my thread context switching. |
Looking at this line in the code: https://github.com/javadelight/delight-nashorn-sandbox/blob/master/src/main/java/delight/nashornsandbox/internal/ThreadMonitor.java#L123 It seems as if the starttime is taken into consideration when calculating if the runtime for a particular thread is exceeded. So it shouldn't be required to create a new thread solely for the purpose to have the cpu limit work. That being said, I think |
I have a question about whether the rhino scripting engine can set thresholds for instruction counts and whether nashorn can do the same without relying on thread monitoring. |
If a thread continuously executes different scripts for a long time, the memory usage will be exceeded. This is because the CPU execution time is the total time of the thread.
The text was updated successfully, but these errors were encountered: