UNPKG

@solid/community-server

Version:

Community Solid Server: an open and modular implementation of the Solid specifications

24 lines 869 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.VoidLocker = void 0; const global_logger_factory_1 = require("global-logger-factory"); /** * This locker will execute the whileLocked function without any locking mechanism * * Do not use this locker in combination with storages that doesn't handle concurrent read/writes gracefully */ function noop() { } class VoidLocker { logger = (0, global_logger_factory_1.getLoggerFor)(this); constructor() { this.logger.warn('Locking mechanism disabled; data integrity during parallel requests not guaranteed.'); } async withReadLock(identifier, whileLocked) { return whileLocked(noop); } async withWriteLock(identifier, whileLocked) { return whileLocked(noop); } } exports.VoidLocker = VoidLocker; //# sourceMappingURL=VoidLocker.js.map