Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions task-killswitch/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ impl TaskKillswitch {
self.activated.load(Ordering::Relaxed)
}

#[track_caller]
fn spawn_task(
&self, fut: impl Future<Output = ()> + Send + 'static,
) -> Option<Id> {
Expand Down Expand Up @@ -220,6 +221,7 @@ static TASK_KILLSWITCH: LazyLock<TaskKillswitch> =
///
/// Under the hood, [`tokio::spawn`] schedules the actual execution.
#[inline]
#[track_caller]
pub fn spawn_with_killswitch(
fut: impl Future<Output = ()> + Send + 'static,
) -> Option<Id> {
Expand Down
2 changes: 2 additions & 0 deletions tokio-quiche/src/metrics/tokio_task.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ impl<F: Future, M: Metrics> Future for Instrumented<F, M> {
///
/// Depending on whether the `tokio-task-metrics` feature is enabled, this may
/// instrument the task and collect metrics for it.
#[track_caller]
pub fn spawn<M, T>(name: &str, metrics: M, future: T) -> JoinHandle<T::Output>
where
T: Future + Send + 'static,
Expand All @@ -184,6 +185,7 @@ where
///
/// Depending on whether the `tokio-task-metrics` feature is enabled, this may
/// instrument the task and collect metrics for it.
#[track_caller]
pub fn spawn_with_killswitch<M, T>(name: &str, metrics: M, future: T)
where
T: Future<Output = ()> + Send + 'static,
Expand Down