Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-5053

AsyncMongoClient.close() should await all background tasks

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 4.12
    • Affects Version/s: None
    • Component/s: None
    • Python Drivers
    • Not Needed

      AsyncMongoClient.close() currently signals each background task (Monitor) it owns to stop, but does not actually await their completion, nor does it cancel them as part of shutting down. A client closing should also stop all background tasks it owns, waiting for them to exit before returning from its close method. 

      Note: this will likely cause further issues with our unittest test suite due to the isolated loop nature of the unittest classes and our existing workarounds.

            Assignee:
            noah.stapp@mongodb.com Noah Stapp
            Reporter:
            noah.stapp@mongodb.com Noah Stapp
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: