Skip to Main Content

MongoByte MongoDB Logo

Welcome to the new MongoDB Feedback Portal!

{Improvement: "Your idea"}
We’ve upgraded our system to better capture and act on your feedback.
Your feedback is meaningful and helps us build better products.

Status Submitted
Created by Guest
Created on Jun 23, 2023

Closing a closed cursor should not throw

If a cursor is already closed, and `close()` is called, it should quietly do nothing. Throwing `IllegalStateException` is just rude.
  • Guest
    Jun 24, 2023
    Also, I know the cursor isn't thread-safe... but it sure would be nice if I could call close() from another thread in order to shut it down asynchronously, especially if the cursor is reading from a change stream on a background thread.