Document that Client can only be used with a single runtime instance

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Duplicate
    • Priority: Unknown
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      We've had a couple users run into issues in the past trying to use a client with multiple tokio runtime instances, for example https://github.com/mongodb/mongo-rust-driver/issues/615.

      It would be good for us to document this somewhere in the manual. Maybe in our client usage guide we could say something like "Clients can only be used with a single runtime instance. If you are using tokio::test you'll need to create a new client for each test. If you want to reuse a client across tests you should use the plain test attribute and share a static runtime across test cases."

              Assignee:
              Unassigned
              Reporter:
              Kaitlin Mahar
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: