"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.RunLocker = void 0;
class RunLocker {
    _lockers = [];
    isLocked(id) {
        return this._lockers.indexOf(String(id)) !== -1;
    }
    lock(id) {
        if (this.isLocked(id)) {
            return;
        }
        this._lockers.push(String(id));
    }
    unlock(id) {
        let index = this._lockers.indexOf(String(id));
        if (index > -1) {
            this._lockers.splice(index, 1);
        }
    }
}
exports.RunLocker = RunLocker;
