mirror of
https://github.com/BetterSEQTA/BetterSEQTA-Plus.git
synced 2026-06-06 11:44:40 +00:00
improve theme selection + bug fixes
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
// Simple mutex implementation
|
||||
export class Mutex {
|
||||
private mutex = Promise.resolve();
|
||||
|
||||
lock(): PromiseLike<() => void> {
|
||||
let begin: (unlock: () => void) => void;
|
||||
|
||||
this.mutex = this.mutex.then(() => new Promise(begin));
|
||||
|
||||
return new Promise(res => begin = res);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user