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

Cancelable timers, streams, and futures #2

Open
TylerBloom opened this issue Nov 14, 2023 · 0 comments
Open

Cancelable timers, streams, and futures #2

TylerBloom opened this issue Nov 14, 2023 · 0 comments
Assignees

Comments

@TylerBloom
Copy link
Owner

Currently, there is no way to cancel streams, timers, and futures that are queued in the scheduler. This should be fairly easy to implement. futures-rs provides an Abortable wrapper for futures and streams. A wrapper around the Abort struct (used to abort an Abortable future/stream) can be given to the caller. This wrapper would contain an ID and implement helpful traits like Hash, Eq, etc using this id. The scheduler can then implement an abort method that takes this wrapper, aborts the future, and decrements its internal counter.

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

No branches or pull requests

1 participant