saker.build
saker.build copied to clipboard
Use locking primitives instead of synchronized blocks
trafficstars
Project Loom introduces virtual threads for the JVM. It doesn't support unscheduling virtual threads that are in a synchronized block. As virtual threads will be a very important feature for the build system, and it can greatly improve performance, it is necessary to switch to using locking primitives instead of synchronized blocks where appropriate.
The usages of synchronized blocks should be refactored where I/O or RMI operations are expected to happen.