Merge pull request #10188 from kpayson64/another_gil_fix

Initialize GIL at startup
pull/10224/head
kpayson64 8 years ago committed by GitHub
commit b4121cad15
  1. 10
      src/python/grpcio/grpc/_cython/cygrpc.pyx

@ -47,14 +47,14 @@ include "_cygrpc/server.pyx.pxi"
#
# initialize gRPC
#
cdef extern from "Python.h":
int Py_AtExit(void(*func)())
int PyEval_InitThreads()
def _initialize():
cdef _initialize():
# We have Python callbacks called by c-core threads, this ensures the GIL
# is initialized.
PyEval_InitThreads()
grpc_set_ssl_roots_override_callback(
<grpc_ssl_roots_override_callback>ssl_roots_override_callback)

Loading…
Cancel
Save