3 ms·
> Because of the GIL, you can't make predictions at the same time you're processing network IO Why not? If the model is a Python wrapper around some C/C++ libr
by ghostwriter 7y ago
> Because of the GIL, you can't make predictions at the same time you're processing network IO
Why not? If the model is a Python wrapper around some C/C++ library, then GIL can be released and this is actually a recommended approach used by almost any CPU-intensive python libraries - https://docs.python.org/3/c-api/init.html#releasing-the-gil-from-extension-code https://docs.python.org/3/c-api/init.html#releasing-the-gil-... You can have parallel computations inside your wrapped C extension, while Python interpreter is processing IO.