Release GIL while compiling protos

pull/21504/head
Richard Belleville 5 years ago
parent 135b94913f
commit c57cb10169
  1. 3
      tools/distrib/python/grpcio_tools/grpc_tools/_protoc_compiler.pyx

@ -109,7 +109,8 @@ def get_protos(bytes protobuf_path, list include_paths):
cdef vector[cProtocError] errors
# NOTE: Abbreviated name used to avoid shadowing of the module name.
cdef vector[cProtocWarning] wrnings
rc = protoc_get_protos(protobuf_path, &c_include_paths, &files, &errors, &wrnings)
with nogil:
rc = protoc_get_protos(protobuf_path, &c_include_paths, &files, &errors, &wrnings)
_handle_errors(rc, &errors, &wrnings, protobuf_path)
return files

Loading…
Cancel
Save