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

Avoid blocking I/O calls in async code paths

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Critical - P2 Critical - P2
    • 4.10.2
    • Affects Version/s: None
    • Component/s: None
    • None
    • Python Drivers
    • Not Needed
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      The wait_for_read function makes a blocking sync call to socket_checker.select in the async code path:
      https://github.com/mongodb/mongo-python-driver/blob/ffa65554852e84a5b92858f85d1d1784525edb72/pymongo/asynchronous/network.py#L378

      We should avoid these calls since they block the loop.

            Assignee:
            noah.stapp@mongodb.com Noah Stapp
            Reporter:
            shane.harvey@mongodb.com Shane Harvey
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: