Added a 'running' function to locks