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

Replace @Synchronized with ReentrantLock to avoid virtual thread pinning #8413

Closed
peacemaker123456 opened this issue May 21, 2024 · 1 comment
Labels
bug Bug in existing code

Comments

@peacemaker123456
Copy link

peacemaker123456 commented May 21, 2024

I noticed that "synchronized" is being used in the form of the Kotlin annotation "@synchronized"
e.g. @synchronized internal fun trackFailure(call: RealCall, e: IOException?)

With virtual threads this leads to a problem called thread pinning. I suggest you replace it with something like ReentrantLock, like it was done here:

spring-projects/spring-framework@0b09f1e

@peacemaker123456 peacemaker123456 added the bug Bug in existing code label May 21, 2024
@yschimke
Copy link
Collaborator

See #8371

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug in existing code
Projects
None yet
Development

No branches or pull requests

2 participants