Skip to content

P2-A: Idle Scheduler (UNBLOCKS: Daydreamer operations) #29

@github-actions

Description

@github-actions

Why: Need cooperative background loop that doesn't block foreground.

  • P2-A1: Implement daydreamer/IdleScheduler.ts

    • Loop via requestIdleCallback (browser) or setImmediate (Node)
    • Interruptible (yield after N ms of work)
    • CPU budget awareness (pause if main thread busy)
    • Task queue (prioritize high-value work)
  • P2-A2: Add scheduler test coverage

    • tests/daydreamer/IdleScheduler.test.ts
    • Test cooperative yielding
    • Test interruption doesn't corrupt state

Exit Criteria: Background loop runs without blocking UI.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2: mediumMedium priority — targets v1.0layer: daydreamerBackground consolidation (LTP/LTD, recalc)

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions