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

maitake: add a "weak task handle" type #266

Open
2 tasks
hawkw opened this issue Jul 26, 2022 · 1 comment
Open
2 tasks

maitake: add a "weak task handle" type #266

hawkw opened this issue Jul 26, 2022 · 1 comment
Labels
crate/maitake Related to the `maitake` crate kind/enhancement New feature or request

Comments

@hawkw
Copy link
Owner

hawkw commented Jul 26, 2022

PR #261 adds a JoinHandle type to maitake::task. A task can only have a single JoinHandle, since there is only one slot for a join waker. However, we could add a "weak task handle" type that allows accessing information about the task without the permission to await its completion and read its output. Unlike JoinHandles, this type could be freely cloned. Tokio has an equivalent of this with the AbortHandle type (currently unstable).

@hawkw hawkw added kind/enhancement New feature or request crate/maitake Related to the `maitake` crate labels Jul 26, 2022
@hawkw
Copy link
Owner Author

hawkw commented Aug 11, 2022

this may just be "add additional methods to TaskRef"...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crate/maitake Related to the `maitake` crate kind/enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant