Skip to content
Snippets Groups Projects
Commit aeb7cf6c authored by Marco Clemencic's avatar Marco Clemencic
Browse files

Release the GIL when bootstrapping with Gaudi.Application

See merge request gaudi/Gaudi!1387
parents 8f59b2cd be87e01a
No related branches found
No related tags found
1 merge request!1387Release the GIL when bootstrapping with Gaudi.Application
Pipeline #4759563 canceled
...@@ -88,9 +88,9 @@ class Application(object): ...@@ -88,9 +88,9 @@ class Application(object):
def __init__(self, opts, appType="Gaudi::Application"): def __init__(self, opts, appType="Gaudi::Application"):
global _GaudiKernelLib global _GaudiKernelLib
if _GaudiKernelLib is None: if _GaudiKernelLib is None:
# FIXME: note that we need PyDLL instead of CDLL if the calls to # Note: using CDLL instead of PyDLL means that every call to the Python C
# Python functions are not protected with the GIL. # API must be protected acquiring the GIL
gkl = _GaudiKernelLib = ctypes.PyDLL( gkl = _GaudiKernelLib = ctypes.CDLL(
"libGaudiKernel" + (".dylib" if sys.platform == "darwin" else ".so"), "libGaudiKernel" + (".dylib" if sys.platform == "darwin" else ".so"),
mode=ctypes.RTLD_GLOBAL, mode=ctypes.RTLD_GLOBAL,
) )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment