DashboardopencodeEffect background layer loops

Effect background layer loops

Category: preference
Confidence: 1.00
ID: 01a0a0db-fcb6-7118-ba41-7db7decf1b2a
Project ID: c0425955-02bc-4c17-9af2-b114c00077e7
Cross-project: No
Recalled in other projects: 0
Source session: 0t3bcaq7M5JSH6AwR
Created: 2026-09-14 16:59:26
Updated: 2026-09-14 16:59:26

Content

Always implement scheduled or repeating Effect background work with Effect.repeat or Effect.schedule, forked via Effect.forkScoped inside the owning layer definition. Ad hoc promises or handler-started loops look simpler but escape layer lifetime and cleanup; layer-scoped fibers preserve process-global ownership and deterministic shutdown.

Move to: