/
githubmirror
/
deno
Обзор
Документация
Войти
/
githubmirror
/
deno
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
tests/specs/task/recursive_parallel/packages/shared/main.ts
24 строки
833 B
Bartek Iwańczuk
fix(cli/task): run recursive workspace tasks in parallel (#34512)
30 май 2026, 10:00
Не верифицирован
30 май 2026, 10:00
77a1e24
Код
Авторство
О чём код?
// Sibling-barrier handshake. Each member writes its own marker, then polls // until all three markers exist. This only completes when the three `dev` // tasks run concurrently — under sequential execution it would deadlock and // the test would time out. const NAME = "shared"; const root = Deno.env.get("INIT_CWD")!; console.log(`${NAME} ready`); await Deno.writeTextFile(`${root}/marker.${NAME}`, ""); const deadline = Date.now() + 15_000; while (true) { try { await Deno.stat(`${root}/marker.server`); await Deno.stat(`${root}/marker.web`); await Deno.stat(`${root}/marker.shared`); break; } catch { if (Date.now() > deadline) { console.error(`${NAME}: timed out waiting for siblings`); Deno.exit(1); } await new Promise((r) => setTimeout(r, 30)); } } console.log(`${NAME} done`);