lavva.exalushome
Version:
Library implementing communication and abstraction layers for ExalusHome system
16 lines • 367 B
JavaScript
export class AsyncLock {
constructor() {
this._promise = Promise.resolve();
this._disable = () => { };
}
Lock() {
this._promise = new Promise(resolve => this._disable = resolve);
}
Unlock() {
this._disable();
}
WaitForLockAsync() {
return this._promise;
}
}
//# sourceMappingURL=AsyncLock.js.map