This commit changes the `synchronized` usage into a `ReentrantLock`, in order to guard write operations with a construct that does not pin virtual threads to the current platform thread on JDK21. Closes gh-30996
This commit changes the `synchronized` usage into a `ReentrantLock`, in order to guard write operations with a construct that does not pin virtual threads to the current platform thread on JDK21. Closes gh-30996