grpc icon indicating copy to clipboard operation
grpc copied to clipboard

Document that grpc.Channels provided by gRPC Python are thread-safe and that stubs provided by gRPC Python are thread-safe when used with thread-safe grpc.Channels

Open AA33 opened this issue 9 years ago • 5 comments

We are using Go for our gRPC server and Python for the clients. Can a client stub created at startup be safely shared across threads/processes?

AA33 avatar Jan 11 '17 21:01 AA33

Yes.

Retitling issue to reflect that we should make this clear in gRPC Python's documentation.

Is there anything that needs to be configured to achieve this? I'm running into a problem with grpc 1.7.0 for python where concurrent access to a grpc stub causes all processes to hang

dvaldivia avatar Nov 28 '17 06:11 dvaldivia

@dvaldivia: no, that's weird and strange and shouldn't be happening. Are you able to share with us a demonstration (code to run and description of environment in which to run it) of that problem?

@nathanielmanistaatgoogle yes, I created a sample project with https://github.com/dvaldivia/grpc-celery-fork-bug also I raised issue #13464

dvaldivia avatar Nov 28 '17 18:11 dvaldivia

This issue/PR has been automatically marked as stale because it has not had any update (including commits, comments, labels, milestones, etc) for 180 days. It will be closed automatically if no further update occurs in 1 day. Thank you for your contributions!

stale[bot] avatar Sep 05 '19 03:09 stale[bot]