improve theme selection + bug fixes

This commit is contained in:
SethBurkart123
2024-05-29 08:01:44 +10:00
parent 4e5a912cbb
commit 026033ad57
7 changed files with 64 additions and 26 deletions
+12
View File
@@ -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);
}
}