| β¦ | β¦ | @@ -94,15 +96,46 @@ const requestDesktopShutdownAndWait = Effect.fn("desktop.lifecycle.requestShutdo | |
| 109 | + | Effect.map(Clock.currentTimeMillis, (now) => { | |
| 110 | + | quit.phase = "waiting"; | |
| 111 | + | quit.waitingSince = now; | |
| 112 | + | }); | |
Please make this reusable Effect operation a named Effect.fn so it has a tracing boundary, consistent with exitIfShutdownStalled.
| 1 | const startWaitingForShutdown = Effect.fn("desktop.lifecycle.startWaitingForShutdown")( |
| 2 | function* (quit: QuitState) { |
| 3 | quit.phase = "waiting"; |
| 4 | quit.waitingSince = yield* Clock.currentTimeMillis; |
| 5 | }, |
| 6 | ); |
Posted via Macroscope β Effect Service Conventions
Done in 91e08f662c: startWaitingForShutdown is now Effect.fn("desktop.lifecycle.startWaitingForShutdown"). It also reads Clock.monotonicTimeNanos now, so a wall-clock jump can't change the 10 s threshold.