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.
1
vote
![](https://secure.gravatar.com/avatar/448ff8d0ae7cf7011026531a2e62133c?size=40&default=https%3A%2F%2Fassets.uvcdn.com%2Fpkg%2Fadmin%2Ficons%2Fuser_70-6bcf9e08938533adb9bac95c3e487cb2a6d4a32f890ca6fdc82e3072e0ea0368.png)
-
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.