Expand description
The fetch worker loop: one task owning every in-flight fetch, lock-free.
Service::run_worker coalesces incoming requests, dispatches attempts up
to the capacity bound, defers the rest, and broadcasts each outcome to its
subscribers.
Re-exportsΒ§
use std::collections::HashMap;πuse std::collections::VecDeque;πuse std::sync::Arc;πuse std::sync::Weak;πuse bytes::Bytes;πuse futures::FutureExt;πuse futures::StreamExt;πuse futures::future::BoxFuture;πuse futures::stream::FuturesUnordered;πuse ruma::OwnedServerName;πuse tokio::sync::watch::channel;πuse tuwunel_core::debug_warn;πuse tuwunel_core::implement;πuse tuwunel_core::trace;πuse tuwunel_core::utils::math::effective_cap;πuse super::Failure;πuse super::Msg;πuse super::Opts;πuse super::Outcome;πuse super::Service;πuse super::error::Attempted;πuse super::inflight::Inflight;πuse super::inflight::Key;π
Type AliasesΒ§
- Fetch
Future π - One in-flight fetch, borrowing the worker for the serviceβs lifetime and yielding its key alongside the result so the worker can route it.
- Fetch
Futures π