sebb-2-2 wrote:
>
> Thread-safety: is the interpreter thread-safe?
>
Both the JexlEngine & UnifiedJEXL are intended to be thread-safe & shared.
Besides usage of final fields in any applicable case, the (Expression,
UnifiedJEXL.Expression, MethodMap & al) shared caches are synchronized for
get/put and the expression node cache are volatile to ensure atomic
read/write ops.
The Interpreter is a "transient" that's never used outside of an eval and
will not be shared.
For peace of mind, the methods that manipulate flags for the
JexlEngine/UnifiedJEXL setLenient, setDebug & al could be made synchronized
or using volatile fields but it does not make much sense to call those after
real usage has began.
The only edge case is the JexlContext (at least the instance created by
JexlHelper) which is *not* threadsafe being based on a HashMap.
--
View this message in context:
http://www.nabble.com/-JEXL--2.0-JSR-223-initial-implementation-added---what-next--tp24750307p24770490.html
Sent from the Commons - Dev mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org