async registerDevice(getDeviceId) {
    return this._lockfile.exclusively(async () => {
      const deviceId = await safeAsync(getDeviceId);
      if (deviceId) {
        this._upsertDevice(deviceId, {
          busy: true,
          sessionId: this._sessionId,
          pid: this._pidService.getPid(),
        });
      }
      return deviceId;
    });
  }
@param {string|Function} getDeviceId
@returns {Promise<string>}