Waitforcondition and monitors blocking
https://pseuco.com/#/edit/remote/gn5a4fbm08ejn2s3cvwf
This program can deadlock, as the waitForCondition in l.6 does only return the monitor lock once, while the thread actually holds it twice, leading to a potential deadlock. This is inconsistent to the behavior that would actually be expected at that point.