<div dir="ltr">The fix is in the loom repo, not in the mainline yet, and most probably won't make it to jdk 23.<div><br></div><div>So replacing synchronized with ReentrantLock is still the solution.<div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Jun 1, 2024 at 6:57 PM Alex <<a href="mailto:filia.aleks@gmail.com">filia.aleks@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi everyone,<div>I have one question about the synchronized methods and virtual threads.</div><div>So in Java 23 the issue with pinned threads for synchronized methods was fixed.</div><div><br></div><div>Before this fix many projects did fixes and replaced synchronized with Lock. What is the latest recommendation? Keep replacing synchronized with Lock or wait for Java 23 and use synchronized methods?</div><div><br></div><div>Thanks,</div><div><br></div><div>Alex Filichkin</div></div>
</blockquote></div>