UNPKG

homebridge-econet-rheem

Version:

Homebridge plugin for control of Rheem and Ruud thermostats and water heaters

16 lines 346 B
export class Mutex { _lock = Promise.resolve(); async lock(fn) { const prev = this._lock; let release; this._lock = new Promise(r => release = r); await prev; try { return await fn(); } finally { release(); } } } //# sourceMappingURL=mutex.js.map