openexr
openexr copied to clipboard
Allow multithreading in python
This can be done by exposing the Imf::setGlobalThreadCount interface in Python bindings.
I have tested the following modification, and it seems to work fine.
--- a/OpenEXR.cpp
+++ b/OpenEXR.cpp
@@ -1238,6 +1238,7 @@ MOD_INIT(OpenEXR)
PyObject *m, *d, *item;
Imf::staticInitialize();
+ Imf::setGlobalThreadCount(8);
MOD_DEF(m, "OpenEXR", "", methods)
d = PyModule_GetDict(m);