Struct grpcio::Environment [−][src]
pub struct Environment { /* fields omitted */ }
Expand description
An object that used to control concurrency and start gRPC event loop.
Implementations
impl Environment
[src]
impl Environment
[src]pub fn new(cq_count: usize) -> Environment
[src]
pub fn new(cq_count: usize) -> Environment
[src]Initialize gRPC and create a thread pool to poll completion queue. The thread pool size
and the number of completion queue is specified by cq_count
. Each thread polls one
completion queue.
Panics
This method will panic if cq_count
is 0.
pub fn completion_queues(&self) -> &[CompletionQueue]
[src]
pub fn completion_queues(&self) -> &[CompletionQueue]
[src]Get all the created completion queues.