8u20 with multi-threaded class cache
cpettitt at linkedin.com
Mon Mar 16 22:03:02 UTC 2015
We're looking into the possibility of using the class cache in multi-threaded code, as introduced in . We have a few questions related to this feature:
1. The article implies that ScriptEngine can be treated as thread-safe - provided we're not using the default context - though the code doesn't state this explicitly. Is this a safe assumption? Are there any other caveats?
2. As we need to set the Context for each eval, does this lock us out of using Invocable?
3. The code for determining if two Sources are the same ultimately falls back to a comparison of the url / name / content of the scripts. Is there a way to eval with a Source to avoid this fallback? It looks like it is not exposed in a public way.
More information about the nashorn-dev