Skip to content

How should we handle linked tasks being cancelled? #94

@beerinho

Description

@beerinho
    await link(b).perform();
    await wait(1000);
    console.log(signal.aborted);
});

const b = task(async (_, { signal })=>{
    await wait(1000);
    console.log(signal.aborted);
});

a.perform();
b.cancelAll();

In this situation (provided b is cancelled after it starts and before it completes) a will remain in the isRunning state (but this might be removed by the recent updates to how state is derived) indefinitely and will also get no updates about what actually happened to its own task instance.

We need to think about the best path forward for this. Do we want to throw an error into a when b is cancelled so that the task at least has something to show

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions