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

Easy way to link tokio JoinHandle with component to abort on unmount #860

Open
namse opened this issue Jun 19, 2024 · 0 comments
Open

Easy way to link tokio JoinHandle with component to abort on unmount #860

namse opened this issue Jun 19, 2024 · 0 comments
Labels
namui This issue is for namui engine

Comments

@namse
Copy link
Contributor

namse commented Jun 19, 2024

Most of time, spawned tokio task should be aborted, so we need to pass that JoinHandle or AbortHandle to ctx.

It would be better to spawn task from ctx, like ctx.task(async move { ... }); then let handle = tokio::spawn(async move {...}); ctx.abort_on_unmount(handle); because it's too long.

@namse namse assigned namse and unassigned namse Jun 19, 2024
@namse namse added the namui This issue is for namui engine label Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
namui This issue is for namui engine
Projects
None yet
Development

No branches or pull requests

1 participant