Skip to content

Commit 85882de

Browse files
committed
fix check wait_executor
1 parent 853d588 commit 85882de

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ydb/_grpc/grpcwrapper/common_utils.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ def __init__(self, convert_server_grpc_to_wrapper):
161161
self._wait_executor = None
162162

163163
def __del__(self):
164-
self._wait_executor.shutdown(wait=False)
164+
self._clean_executor(wait=False)
165165

166166
async def start(self, driver: SupportedDriverType, stub, method):
167167
if asyncio.iscoroutinefunction(driver.__call__):
@@ -175,11 +175,11 @@ def close(self):
175175
if self._stream_call:
176176
self._stream_call.cancel()
177177

178-
self._clean_executor()
178+
self._clean_executor(wait=True)
179179

180-
def _clean_executor(self):
180+
def _clean_executor(self, wait: bool):
181181
if self._wait_executor:
182-
self._wait_executor.shutdown()
182+
self._wait_executor.shutdown(wait)
183183

184184
async def _start_asyncio_driver(self, driver: ydb.aio.Driver, stub, method):
185185
requests_iterator = QueueToIteratorAsyncIO(self.from_client_grpc)

0 commit comments

Comments
 (0)