-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Make virtual-thread-friendly #1018
Comments
The JEP authors and users have a more serious issue that |
Virtual threads are available as a preview feature in JDK 19 and will come out of preview in JDK 21 (https://openjdk.org/jeps/444). It would be nice to be able to use them with Caffeine without incurring the performance penalty of thread pinning, which blocks all other virtual threads on the carrier thread during a
synchronized
block or native call. The proposal here is to follow the JEP and "... avoid ... pinning by revisingsynchronized
blocks ... to usejava.util.concurrent.locks.ReentrantLock
instead."The text was updated successfully, but these errors were encountered: