From 26a029d407be480d791972afb5975cf62c9360a6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 02:47:55 +0200 Subject: Adding upstream version 124.0.1. Signed-off-by: Daniel Baumann --- third_party/rust/tokio/src/runtime/config.rs | 37 ++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 third_party/rust/tokio/src/runtime/config.rs (limited to 'third_party/rust/tokio/src/runtime/config.rs') diff --git a/third_party/rust/tokio/src/runtime/config.rs b/third_party/rust/tokio/src/runtime/config.rs new file mode 100644 index 0000000000..c42e4fe5a8 --- /dev/null +++ b/third_party/rust/tokio/src/runtime/config.rs @@ -0,0 +1,37 @@ +#![cfg_attr(any(not(feature = "full"), tokio_wasm), allow(dead_code))] +use crate::runtime::Callback; +use crate::util::RngSeedGenerator; + +pub(crate) struct Config { + /// How many ticks before pulling a task from the global/remote queue? + pub(crate) global_queue_interval: Option, + + /// How many ticks before yielding to the driver for timer and I/O events? + pub(crate) event_interval: u32, + + /// Callback for a worker parking itself + pub(crate) before_park: Option, + + /// Callback for a worker unparking itself + pub(crate) after_unpark: Option, + + /// The multi-threaded scheduler includes a per-worker LIFO slot used to + /// store the last scheduled task. This can improve certain usage patterns, + /// especially message passing between tasks. However, this LIFO slot is not + /// currently stealable. + /// + /// Eventually, the LIFO slot **will** become stealable, however as a + /// stop-gap, this unstable option lets users disable the LIFO task. + pub(crate) disable_lifo_slot: bool, + + /// Random number generator seed to configure runtimes to act in a + /// deterministic way. + pub(crate) seed_generator: RngSeedGenerator, + + /// How to build poll time histograms + pub(crate) metrics_poll_count_histogram: Option, + + #[cfg(tokio_unstable)] + /// How to respond to unhandled task panics. + pub(crate) unhandled_panic: crate::runtime::UnhandledPanic, +} -- cgit v1.2.3