Lock object example