Skip to content

Commit

Permalink
feat: Stabalise JoinMap
Browse files Browse the repository at this point in the history
  • Loading branch information
conradludgate committed Jan 6, 2025
1 parent 15f7366 commit eb9f646
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
7 changes: 1 addition & 6 deletions tokio-util/src/task/join_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ use tokio::task::{AbortHandle, Id, JoinError, JoinSet, LocalSet};
///
/// When the `JoinMap` is dropped, all tasks in the `JoinMap` are immediately aborted.
///
/// **Note**: This type depends on Tokio's [unstable API][unstable]. See [the
/// documentation on unstable features][unstable] for details on how to enable
/// Tokio's unstable features.
///
/// # Examples
///
/// Spawn multiple tasks and wait for them:
Expand Down Expand Up @@ -96,11 +92,10 @@ use tokio::task::{AbortHandle, Id, JoinError, JoinSet, LocalSet};
/// ```
///
/// [`JoinSet`]: tokio::task::JoinSet
/// [unstable]: tokio#unstable-features
/// [abort]: fn@Self::abort
/// [abort_matching]: fn@Self::abort_matching
/// [contains]: fn@Self::contains_key
#[cfg_attr(docsrs, doc(cfg(all(feature = "rt", tokio_unstable))))]
#[cfg_attr(docsrs, doc(cfg(feature = "rt")))]
pub struct JoinMap<K, V, S = RandomState> {
/// A map of the [`AbortHandle`]s of the tasks spawned on this `JoinMap`,
/// indexed by their keys and task IDs.
Expand Down
2 changes: 1 addition & 1 deletion tokio-util/src/task/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ mod spawn_pinned;
pub use spawn_pinned::LocalPoolHandle;

#[cfg(tokio_unstable)]
#[cfg_attr(docsrs, doc(cfg(all(tokio_unstable, feature = "rt"))))]
#[cfg_attr(docsrs, doc(cfg(feature = "rt")))]
pub use join_map::{JoinMap, JoinMapKeys};

pub mod task_tracker;
Expand Down
2 changes: 1 addition & 1 deletion tokio-util/tests/task_join_map.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#![allow(unknown_lints, unexpected_cfgs)]
#![warn(rust_2018_idioms)]
#![cfg(all(feature = "rt", tokio_unstable))]
#![cfg(feature = "rt")]

use tokio::sync::oneshot;
use tokio::time::Duration;
Expand Down

0 comments on commit eb9f646

Please sign in to comment.