Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-1259

Ensure Async cursors can be cancelled

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 3.0.0
    • None
    • Async
    • None

    Description

      Currently the way to stop iterating an async cursor is to return false from the Block.

      A better way might be to instead call cancel() on the Future returned from the forEach method() in the higher level API. This models more closely the way a Subscription works in RxJava.

      Attachments

        Activity

          People

            ross@mongodb.com Ross Lawley
            ross@mongodb.com Ross Lawley
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: