Rename and remove redundant logic

This commit is contained in:
awsr
2025-11-30 22:05:14 -08:00
parent 143558df4b
commit b25cf56181
+3 -5
View File
@@ -67,12 +67,10 @@ class SimpleFunctionQueue {
return;
}
this.#queue.push(config);
if (!this.#running) {
this.#runNext();
}
this.#tryRunNext();
}
async #runNext() {
async #tryRunNext() {
if (this.#running || !this.#queue.length) return;
try {
const { signal, callback } = this.#queue.shift();
@@ -85,7 +83,7 @@ class SimpleFunctionQueue {
error(`${this.#id} Queue:`, err);
} finally {
this.#running = false;
this.#runNext();
this.#tryRunNext();
}
}
}