Simplify TaskWithTimeout

Co-authored-by: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com>
Co-authored-by: trevor-signal <131492920+trevor-signal@users.noreply.github.com>
This commit is contained in:
automated-signal
2026-03-24 11:31:03 -05:00
committed by GitHub
parent 09126429c0
commit 1a7112ec74
12 changed files with 164 additions and 212 deletions

View File

@@ -3,7 +3,7 @@
import { ipcRenderer } from 'electron';
import { createLogger } from '../logging/log.std.js';
import createTaskWithTimeout from '../textsecure/TaskWithTimeout.std.js';
import { runTaskWithTimeout } from '../textsecure/TaskWithTimeout.std.js';
import { explodePromise } from '../util/explodePromise.std.js';
import { missingCaseError } from '../util/missingCaseError.std.js';
@@ -45,7 +45,7 @@ export async function ipcInvoke<T>(
}
activeJobCount += 1;
return createTaskWithTimeout(async () => {
return runTaskWithTimeout(async () => {
try {
const result = await ipcRenderer.invoke(channel, name, ...args);
if (!result.ok) {
@@ -58,7 +58,7 @@ export async function ipcInvoke<T>(
resolveShutdown?.();
}
}
}, `SQL channel call (${access}, ${fnName})`)();
}, `SQL channel call (${access}, ${fnName})`);
}
export async function doShutdown(): Promise<void> {