mirror of https://github.com/grpc/grpc.git
[Fix Python Deadlock] Guard grpc_ssl_credentials_create with nogil (#34712)
Fix: https://github.com/grpc/grpc/issues/34672 With some recent changes in core, now `grpc_ssl_credentials_create` is guarded by `gpr_once_init`. In our current implementation, The thread got `gpr_once_init` lock might require GIL lock during the execution of `grpc_ssl_credentials_create`, which might cause a deadlock if another thread is holding GIL lock and waiting for `gpr_once_init` lock. This change adds `with nogil` to calls to native function `grpc_ssl_credentials_create` to make sure GIL is released before calling `grpc_ssl_credentials_create`. <!-- If you know who should review your pull request, please assign it to that person, otherwise the pull request would get assigned randomly. If your pull request is for a specific language, please add the appropriate lang label. -->pull/34727/head
parent
301636dae0
commit
ccfc5b92e4
2 changed files with 29 additions and 4 deletions
Loading…
Reference in new issue