Skip to main content Module manager Copy item path Source use std::panic::AssertUnwindSafe ; ๐ use std::sync::Arc ; ๐ use std::sync::atomic::AtomicUsize ; ๐ use std::sync::atomic::Ordering ; ๐ use std::time::Duration ; ๐ use futures::FutureExt; ๐ use futures::TryFutureExt; ๐ use tokio::sync::Mutex; ๐ use tokio::sync::MutexGuard; ๐ use tokio::task::JoinHandle; ๐ use tokio::task::JoinSet; ๐ use tokio::task::yield_now; ๐ use tokio::time::sleep; ๐ use tuwunel_core::Err ; ๐ use tuwunel_core::Error ; ๐ use tuwunel_core::Result ; ๐ use tuwunel_core::Server ; ๐ use tuwunel_core::debug ; ๐ use tuwunel_core::debug ; ๐ use tuwunel_core::debug::INFO_SPAN_LEVEL ; ๐ use tuwunel_core::debug_warn ; ๐ use tuwunel_core::defer ; ๐ use tuwunel_core::error ; ๐ use tuwunel_core::error ; ๐ use tuwunel_core::utils::time ; ๐ use tuwunel_core::warn ; ๐ use crate::Services ; ๐ use crate::service::Service ; ๐ Manager ๐ RESTART_DELAY_MS ๐ worker ๐ Base frame for service worker. This runs in a tokio::task. All errors and
panics from the worker are caught and returned cleanly. The JoinHandle
should never error with a panic, and if so it should propagate, but it may
error with an Abort which the manager should handle along with results to
determine if the worker should be restarted. WorkerResult ๐ Workers ๐ WorkersLocked ๐