With lock timeout

In case of timeout, throw custom exception. TimeoutException could be thrown in callback as well; you need to be able to distinguish between these two cases.