Skip to content
Snippets Groups Projects
Commit b4121cad authored by kpayson64's avatar kpayson64 Committed by GitHub
Browse files

Merge pull request #10188 from kpayson64/another_gil_fix

Initialize GIL at startup
parents 021fa525 867e35a4
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
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