It is not defined for synchronization that which thread will enter a
synchronized block. It may happen that if many threads are waiting
for the entry to a synchronized block, some threads may have to wait
longer than other threads.
Hence these threads with lower priority will not get enough time to
finish their work in time.
https://medium.com/javarevisited/starvation-of-threads-in-java-e3d6bcfeb770