Skuld.Coroutine.InternalSuspended (skuld v0.28.0)

View Source

Fiber suspended with an internal scheduler dependency (channel, batch, await).

Env semantics

env.state is stale — the scheduler extracts it into the shared pool state at suspension time. On resume, the scheduler injects fresh shared state from the pool, so env.state is overwritten before the continuation runs. The env is stored in full so cancel/2 has access to leave_scope and any stale-but-useful state for cleanup (e.g. Writer logs).

Summary

Types

t()

@type t() :: %Skuld.Coroutine.InternalSuspended{
  env: Skuld.Comp.Env.t(),
  id: reference(),
  k: Skuld.Comp.Types.k(),
  suspend: Skuld.Comp.InternalSuspend.t()
}