Replies: 1 comment
|
Hi @t12g, the CEL Python stack is built in C++, so it should be thread compatible unless we've done something silly in the Python wrappers |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi,
This is another thread safe question similar to #878.
We are using CEL in Python. We share a single process-wide cel.NewEnv(), built once (no runtime variable/function/extension registration), to evaluate user-authored filters. We only call compile(..., disable_check=True), which in the wrapper takes the compiler->GetParser().Parse(...) path. We make concurrent calls on GetParser().Parse() from multiple threads on the same Compiler. "Compiler instances should be thread-compatible" is documented on the Compiler, but we couldn’t find thread-safety comments on Parser. Based on the code, it appears that it is safe to have concurrent GetParser().Parse() calls, but want to double-check here in case we read it wrong.
tagging @TristonianJones here since he answered the previous thread-safety question
All reactions