runtime: add doc note that on_*_task_poll is unstable (#7311)

This commit is contained in:
Alice Ryhl 2025-05-06 10:46:05 +02:00 committed by GitHub
parent f0fdef80c4
commit bdd64cc9d3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -770,6 +770,7 @@ impl Builder {
/// # }
/// ```
#[cfg(tokio_unstable)]
#[cfg_attr(docsrs, doc(cfg(tokio_unstable)))]
pub fn on_before_task_poll<F>(&mut self, f: F) -> &mut Self
where
F: Fn(&TaskMeta<'_>) + Send + Sync + 'static,
@ -813,6 +814,7 @@ impl Builder {
/// # }
/// ```
#[cfg(tokio_unstable)]
#[cfg_attr(docsrs, doc(cfg(tokio_unstable)))]
pub fn on_after_task_poll<F>(&mut self, f: F) -> &mut Self
where
F: Fn(&TaskMeta<'_>) + Send + Sync + 'static,