The lock always need to be acquired outside of the try/finally block.