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
rt: make JoinSet
unstable
#4499
Conversation
There are still some open questions related to the API. Until they are resolved, the type should be marked as unstable so releases are not blocked.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably also add a note in the JoinSet
docs that it's unstable, and link to the documentation on unstable features, like the way we do for task::Builder
etc:
tokio/tokio/src/task/builder.rs
Lines 7 to 9 in 8fb15da
/// **Note**: This is an [unstable API][unstable]. The public API of this type | |
/// may break in 1.x releases. See [the documentation on unstable | |
/// features][unstable] for details. |
Once that's added, this looks good to me!
@carllerche mind making the docs change i suggested so we can merge this? thanks! |
PR #4499 made the `JoinSet` API unstable, but did not add a documentation note explaining unstable features. This branch adds a note on unstable APIs to the `JoinSet` type-level documentation, similar to the notes for `task::Builder` and the runtime metrics APIs. Also, I noticed that there was a broken link to the top-level documentation on unstable APIs in the docs for `task::Builder`, so I fixed that as well.
## Motivation PR #4499 made the `JoinSet` API unstable, but did not add a documentation note explaining unstable features. In general, since the docs.rs build includes unstable APIs, it's probably worth including these notes so that users understand what it means for an API to be unstable. ## Solution This branch adds a note on unstable APIs to the `JoinSet` type-level documentation, similar to the notes for `task::Builder` and the runtime metrics APIs. Also, I noticed that there was a broken link to the top-level documentation on unstable APIs in the docs for `task::Builder`, so I fixed that as well.
There are still some open questions related to the API. Until they are
resolved, the type should be marked as unstable so releases are not
blocked.
Specifically, how can tasks spawned onto the
JoinSet
be canceled?My inclination would be to return an
AbortHandle
fromJoinSet::spawn
.