help-jel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-jel] Evaluator.compile() thread safe


From: Konstantin L. Metlov
Subject: Re: [Help-jel] Evaluator.compile() thread safe
Date: Tue, 12 Jun 2018 16:42:19 +0300
User-agent: SquirrelMail/1.4.23 [SVN]

These methods perform a static initialization during the Evaluator class
loading and the initialized variables are then used in read-only fashion.
Basically, they initialize the ClassFile object and keep a copy, which is
then cloned for each compiled expression to avoid initializing it again
and again.

So, the short answer -- it should not break thread safety IMHO.

I remember to have introduced synchronization into JEL class loader to fix
a race condition, exposed in a heavily threaded environment. This means
that the rest of the code was fine.

With the best regards,
                         Konstantin.

> Hi,
>
> There are some static fields in class Evaluator. Do these affect
compile(...) method with respect to thread safety?
>
> Regards,
> Alexei
>
>







reply via email to

[Prev in Thread] Current Thread [Next in Thread]