Add some info about concurrent usage to client mod (#328)
This commit is contained in:
@@ -6,6 +6,15 @@
|
|||||||
//!
|
//!
|
||||||
//! This client is generally used by some code generation tool to provide stubs
|
//! This client is generally used by some code generation tool to provide stubs
|
||||||
//! for the gRPC service. Thusly, they are a bit cumbersome to use by hand.
|
//! for the gRPC service. Thusly, they are a bit cumbersome to use by hand.
|
||||||
|
//!
|
||||||
|
//! ## Concurrent usage
|
||||||
|
//!
|
||||||
|
//! Upon using the your generated client, you will discover all the functions
|
||||||
|
//! corresponding to your rpc methods take `&mut self`, making concurrent
|
||||||
|
//! usage of the client difficult. The answer is simply to clone the client,
|
||||||
|
//! which is cheap as all client instances will share the same channel for
|
||||||
|
//! communication. For more details, see
|
||||||
|
//! [transport::Channel](../transport/struct.Channel.html#multiplexing-requests).
|
||||||
|
|
||||||
mod grpc;
|
mod grpc;
|
||||||
mod service;
|
mod service;
|
||||||
|
|||||||
Reference in New Issue
Block a user