One stub, multiple calls

52 views
Skip to first unread message

sui ma

unread,
Sep 18, 2024, 12:51:04 PM9/18/24
to grpc.io
Hey all,
I am using a single stub to create multiple RPC calls in my program, and the program will create another RPC call without the previous RPC call being finished, I would like to know if this is feasible, and can the stub manage multiple RPC calls in a single-threaded environment?
Thanks,
Sui Ma

Mehrdad Afshari

unread,
Sep 20, 2024, 1:04:20 PM9/20/24
to grpc.io
You can certainly share a stub for multiple RPCs; it is often a recommended practice [in most gRPC languages]. I am not sure what you mean by single-threaded environment though? gRPC core itself will spin up threads as necessary but your application logic can be a single thread/async.

--
Mehrdad Afshari
Founder & CEO, Signeen
Reply all
Reply to author
Forward
0 new messages