Chapter 2 - Recipe #7: Using multiple conditions in a Lock