We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e52965e commit 67759cdCopy full SHA for 67759cd
pymongo/lock.py
@@ -82,9 +82,11 @@ def _release_locks() -> None:
82
83
84
async def _async_cond_wait(condition: Condition, timeout: Optional[float]) -> bool:
85
+ fut = asyncio.ensure_future(condition.wait())
86
try:
- return await wait_for(condition.wait(), timeout)
87
+ return await wait_for(fut, timeout)
88
except asyncio.TimeoutError:
89
+ await fut
90
return False
91
92
0 commit comments