Source: https://se.inf.ethz.ch/old/teaching/ss2004/0250/lectures/oosc_20_concurrency.pdf