Lock

adds `.lock()` and `.unlock()`.

cc @calvinfo @gjohnson