-
Notifications
You must be signed in to change notification settings - Fork 1.1k
PYTHON-5044 - Fix successive AsyncMongoClients on a single loop always ti… #2065
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
5a1e7cb
cdc2cf0
b898826
6547c3c
f1f8d62
a4eedb3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -75,6 +75,8 @@ def close(self, dummy: Any = None) -> None: | |
| callback; see monitor.py. | ||
| """ | ||
| self._stopped = True | ||
| if self._task: | ||
| self._task.cancel() | ||
|
||
|
|
||
| async def join(self, timeout: Optional[int] = None) -> None: | ||
| if self._task is not None: | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yielding here doesn't guarantee anything about task cleanup. Shouldn't we actually await the tasks to ensure they are cleaned up properly?