class Rake::Promise

def work

If no one else is working this promise, go ahead and do the chore.
def work
  stat :attempting_lock_on, item_id: object_id
  if @mutex.try_lock
    stat :has_lock_on, item_id: object_id
    chore
    stat :releasing_lock_on, item_id: object_id
    @mutex.unlock
  else
    stat :bailed_on, item_id: object_id
  end
end