Skip to content

Cmd effects have no cancellation or cleanup lifecycle #139

Description

@Milky2018

Problem

Cmd::Effect uses OnExecute = (&Scheduler) -> Unit. Once an async or callback-based effect starts, the runtime has no cancellation or cleanup hook tied to the originating cell.

If the cell is detached or the application stops caring about the result, the effect may continue running and enqueue a stale message later.

Expected

Allow an effect to provide an optional cleanup/cancel callback that the runtime invokes when its owning cell is detached or the application is disposed. Existing fire-and-forget effects can keep returning no cleanup.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions