#initialize... { lock($Buffer); # We've got the lock # Do stuff } # Fall off the end of our enclosing scope