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.
Patrick Doyle commented
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.