Added lock and unlock operators.