mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-02-03 16:53:47 +03:00
16 lines
383 B
TypeScript
16 lines
383 B
TypeScript
import { sleep } from "@main/helpers";
|
|
import { DownloadManager } from "./download";
|
|
import { watchProcesses } from "./process-watcher";
|
|
|
|
export const startMainLoop = async () => {
|
|
// eslint-disable-next-line no-constant-condition
|
|
while (true) {
|
|
await Promise.allSettled([
|
|
watchProcesses(),
|
|
DownloadManager.watchDownloads(),
|
|
]);
|
|
|
|
await sleep(500);
|
|
}
|
|
};
|