tokio-rs / tokio

A runtime for writing reliable asynchronous applications with Rust. Provides I/O, networking, scheduling, timers, ...
https://tokio.rs
MIT License
26.59k stars 2.45k forks source link

task: stabilize `consume_budget` #6622

Closed robjtede closed 3 months ago

robjtede commented 3 months ago

Motivation

This utility seems simple and complete. Stabilizing it avoids the need for workarounds to consuming/reading Tokio's task budgets such as abusing io::Empty.

Solution

Stabilize task::consume_budget().