We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
现在有一个需求,需要多线程并发执行计算任务,每个任务都会调用 AviatorEvaluator.execute() 进行表达式计算,如果不做任何措施,会存在线程安全问题吗?
The text was updated successfully, but these errors were encountered:
AviatorEvaluator.execute() 本身是线程安全的。只要你的表达式执行逻辑是线程安全的,传入的 env 是线程安全的,那就没有问题。
Sorry, something went wrong.
好的,谢谢,这样我就可以放心的在项目中使用了
请问大神,env为确保线程安全的话,是否需要传入ConcurrentHashMap?
核心的问题是你的 env 是否会被并发修改,跟传不传没关系。如果没有,那就不用 ConcurrentHashMap
No branches or pull requests
现在有一个需求,需要多线程并发执行计算任务,每个任务都会调用 AviatorEvaluator.execute() 进行表达式计算,如果不做任何措施,会存在线程安全问题吗?
The text was updated successfully, but these errors were encountered: