Skip to content
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

[WIP] Replace trivial synchronized blocks with reentrant locks #2566

Merged

Conversation

tzolov
Copy link
Contributor

@tzolov tzolov commented Dec 6, 2023

  • replace all trivial occurrences of synchronized block by Reentrant locks.

Resolves #2481

@@ -224,11 +227,18 @@ public void testWithSMLCAndConnectionListener() throws Exception {
final AtomicReference<Object> connectionMakerKey2 = new AtomicReference<>();
SimpleMessageListenerContainer container = new SimpleMessageListenerContainer(connectionFactory) {

Lock lock = new ReentrantLock();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tell me, please, if we really have to fix this test as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really. Just for "concurrency".
What do you think? don't touch the tests?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. Let's save our energy not bothering with tests!

@artembilan artembilan merged commit c5489e2 into spring-projects:main Dec 11, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Examine synchronized Block Usage
2 participants