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

Removing discard Future and asyncspawn #1163

Open
lchenut opened this issue Aug 5, 2024 · 0 comments
Open

Removing discard Future and asyncspawn #1163

lchenut opened this issue Aug 5, 2024 · 0 comments

Comments

@lchenut
Copy link
Contributor

lchenut commented Aug 5, 2024

Discarding Future is generally a bad idea because the Future created could be "garbage collected" and cause segfault with a wrong condition.

Even if it's a better way of doing things, asyncspawn is also not recommended because it's uncontrollable. It creates a Future artifact to which nobody has access.

For both this problems, it's best to store the resulting Future in some object so that we can, at the very least, cancel it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: backlog
Development

No branches or pull requests

1 participant