yield block only if could obtain lock

The problem here is that you yield the block given in `lock.lock` whatever the result is.
If you couldn't obtain it, or it is `:recovered`, you should not allow to enter the critical section