public static function lock($filePath, $timeout = null)
    {
        $filePath = FileHelper::normalizePath($filePath);
        $timeout = isset($timeout) ? $timeout : static::$LockTimeout;
        $expire = time() + $timeout;
        if (isset(static::$_lockedFiles[$filePath])) {
            $expire = static::$_lockedFiles[$filePath] <= $expire ? $expire : static::$_lockedFiles[$filePath];
        }
        static::$_lockedFiles[$filePath] = $expire;
        static::checkUnlockTimer();
    }