Java virtual threads, synchronized and deadlocking

Content:

Two versions of the same story:

Besides the specific point, then it also illustrates that even if the code is high level then some low level understanding can be required.

Comments: