code: public function acquire($name, $timeout = 0)
      {
          if (!in_array($name, $this->_locks, true) && $this->acquireLock($name, $timeout)) {
              $this->_locks[] = $name;
  
              return true;
          }
  
          return false;
      }
docs: Acquires a lock by name.
  @param string $name of the lock to be acquired. Must be unique.
  @param int $timeout time (in seconds) to wait for lock to be released. Defaults to zero meaning that method will return
  false immediately in case lock was already acquired.
  @return bool lock acquiring result.