-
Type:
Task
-
Resolution: Done
-
Priority:
Unknown
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
Context
AsyncMongoClient.cleanup_cursor is a coroutine, making it uncallable from any __die_ methods. This prevents asynchronous cursor classes from correctly cleaning up at GC time. We need to separate out the code path in AsyncMongoClient._cleanup_cursor that allows locks from the lock-free code path in order for async cursors to cleanup.
Definition of done
AsyncMongoClient._cleanup_cursor must be synchronous and not attempt to lock.
Pitfalls
Everywhere we use AsyncMongoClient._cleanup_cursor will have to explicitly call the locking or lockless version after this change.