micrometer-jvm-extras icon indicating copy to clipboard operation
micrometer-jvm-extras copied to clipboard

Replace synchronized block with ReentrantLock to avoid possible thread pinning with virtual threads (java 21)

Open ofaizulin opened this issue 1 year ago • 1 comments

It's recommended to avoid using synchronized block with VirtualThreads. Spring Boot starting from 3.2 and other frameworks now allow to run using virtual threads, so it's small, but valuable change for such scenarios.

ofaizulin avatar Feb 26 '24 11:02 ofaizulin