76a59fd6e2
This automatically unlocks its lock when it goes out of scope, and provides a safe(ish) method to call .wait.