Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How should we handle linked tasks being cancelled? #94

Open
beerinho opened this issue May 31, 2024 · 1 comment
Open

How should we handle linked tasks being cancelled? #94

beerinho opened this issue May 31, 2024 · 1 comment
Labels
question Further information is requested

Comments

@beerinho
Copy link
Collaborator

    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

@beerinho beerinho added the question Further information is requested label May 31, 2024
@nickschot
Copy link
Member

Is this still a problem? Or did #98 fix it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants