def __init__(self, _channel, loop=None, executor=None, standalone_pool_for_streaming=False):
"""Constructor.
Args:
_channel: wrapped grpc.Channel
loop: asyncio event loop
executor: a thread pool, or None to use the default pool of the loop
standalone_pool_for_streaming: create a new thread pool (with 1 thread) for each streaming
method
"""
self._channel = _channel
if loop is None:
loop = _asyncio.get_event_loop()
self._loop = loop
self._executor = executor
self._standalone_pool = standalone_pool_for_streaming
self._subscribe_map = {}
评论列表
文章目录