On 19/09/2023 13:31, Christopher Schultz wrote:
<snip/>
Are we trying to avoid synchronized() these days to better-support
Virtual Threads? These appear to be very small blocks so maybe it
doesn't matter but I figured I would ask.
<shameless-plug>
More of this in my talk in Halifax a CoC but,
</shameless-plug>
what matters with virtual threads and synchronized blocks is avoiding
performing a blocking operation inside the synchronized block. As long
as you don't perform a blocking operation (blocking I/O read/write being
the obvious examples) then virtual threads should be fine with a
synchronized block.
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org