-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Replace synchronized with ReentrantLock #984
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
In order to get the benefit for structured concurrency, the driver must use Lock#lockInterruptibly rather than simply Lock#lock. JAVA-4642
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good - one DRY and naming improvement suggestion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Updated GridFS as well |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
In order to get the benefit for structured concurrency, the driver
must use Lock#lockInterruptibly rather than simply Lock#lock.
JAVA-4642
What use of
synchronized
is left out of this PR?MongoInterruptedException
is in driver-core, not bson, so it wasn't clear what exception should be thrown. So deferring this for now