[csot] Add pymongo.timeout() context manager API

XMLWordPrintableJSON

    • Type: New Feature
    • Resolution: Fixed
    • Priority: Unknown
    • 4.2
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      For CSOT, add pymongo.timeout() context manager API:

      import pymongo
      # All blocking pymongo operations in this context combined
      # must complete within 100ms or raise a timeout exception.
      with pymongo.timeout(0.1):
          d1 = client1.db1.c1.find_one()
          d2 = client2.db2.c2.find_one()
      

            Assignee:
            Shane Harvey
            Reporter:
            Shane Harvey
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: