| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
…lation deadlock in CEL Python. This change adds cel_parallel_test.py to benchmark and validate compiling and evaluating a diverse set of CEL expressions concurrently across multiple worker threads using concurrent.futures.ThreadPoolExecutor as well as sequentially. In addition, this resolves an AB-BA deadlock between the Python GIL and Protobuf DescriptorPool C++ mutex during concurrent compilation by releasing the GIL in PyCelEnv::Compile and acquiring the GIL via py::gil_scoped_acquire on-demand in PyDescriptorDatabase callbacks, while protecting PyCelEnvInternal with a mutex. Test duration metrics: - Multi-threaded compilation (1,000 iterations): ~248 ms - Sequential compilation (1,000 iterations): ~394 ms - Multi-threaded evaluation (10,000 iterations): ~782 ms - Sequential evaluation (10,000 iterations): ~434 ms PiperOrigin-RevId: 970277102
| Back | FazBrowse Home | New Git URL |
Add multi-threaded compilation and evaluation tests and resolve compilation deadlock in CEL Python.
This change adds cel_parallel_test.py to benchmark and validate compiling and
evaluating a diverse set of CEL expressions concurrently across multiple worker
threads using concurrent.futures.ThreadPoolExecutor as well as sequentially.
In addition, this resolves an AB-BA deadlock between the Python GIL and Protobuf
DescriptorPool C++ mutex during concurrent compilation by releasing the GIL
in PyCelEnv::Compile and acquiring the GIL via py::gil_scoped_acquire on-demand
in PyDescriptorDatabase callbacks, while protecting PyCelEnvInternal with a mutex.
Test duration metrics: