Uploaded image for project: 'Rust Driver'
  1. Rust Driver
  2. RUST-1259

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

    • Type: Icon: Task Task
    • Resolution: Duplicate
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: None
    • Component/s: 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 Unassigned
            Reporter:
            kaitlin.mahar@mongodb.com Kaitlin Mahar
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: