Is it therefore safe to share Scriptable objects between Contexts when they 
have the same top level scope?

My use case is a little rules engine where at startup I evaluate the 
"rules.js" and capture the resultant rules object as a ScriptableObject.

Then for every web request (eg each in its own thread) I want to "evalutate" 
JS Functions from the original "ruleset" scriptable object.

It will be a in a read only manner.  Predefined rules are only ever 
evaluated in my case.  There are only ever true of a given read only piece 
of input.

I gather I would do a Context.enter()/exit() for each web request thread and 
also create a new scope object for each thread but is it safe to "execute" 
functions on a Scrtiptable that was created
in another thread and with another parent scope?


Cheers
Brad Baker
Atlassian 


_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino

Reply via email to