-
Type:
Task
-
Resolution: Duplicate
-
Priority:
Unknown
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
None
-
Python Drivers
-
None
-
None
-
None
-
None
-
None
-
None
Using an AsyncMongoClient across event loops is not supported. For example:
client = AsyncMongoClient()
asyncio.run(client.server_info)
asyncio.run(client.server_info) # Undefined and erroneous behavior
We should explicitly call out in the differences between Sync and Async PyMongo that AsyncMongoClients cannot be shared across threads or event loops.
For context, Motor does not allow this either but users are often confused by that behavior.
- duplicates
-
PYTHON-4724 Prohibit AsyncMongoClient from being used across multiple event loops
-
- Closed
-