Add ability to set timeout in Lock object

When using lock with contextmanager, you currently have no way to set timeout. Would it be possible to add this the same way as with lifetime?

Edited by Sander Hoentjen