See https://hibernate.atlassian.net/browse/HHH-15541, apparently synchronized blocks cause problems with Loom by “pinning threads”. What that means exactly is secondary, I think; the important part is that migrating from synchronized blocks to locks should be trivial, so we might as well do it. So, let’s remove synchronized blocks from non-test code, and use locks instead. Also, while we’re at it, we should probably add a checkstyle rule to forbid synchronized blocks (and suggest using locks instead, with a link to this ticket). |