adapter
ModuleContents
Structs
ChannelIdle connections in a queue: the longest idle is reused first, and `Adapter::pop` waits for a connection to come back (or for capacity to be freed) up to its timeout. Wake-ups are coalesced to one pending signal, and a woken waiter that takes a connection passes the signal on while more remain.StackIdle connections on a stack: the most recently returned is reused first, and `Adapter::pop` never waits.use utopia_pools::Channel;Rust
pub struct Channel<T>Idle connections in a queue: the longest idle is reused first, and
Adapter::pop waits for a connection to come back (or for capacity to
be freed) up to its timeout. Wake-ups are coalesced to one pending
signal, and a woken waiter that takes a connection passes the signal on
while more remain.
Also implements
Default.use utopia_pools::Stack;Rust
pub struct Stack<T>Idle connections on a stack: the most recently returned is reused first,
and Adapter::pop never waits.
Also implements
Default.use utopia_pools::Adapter;Rust
pub trait Adapter<T>: Send + Sync + 'staticStorage and wake-ups for a pool's idle connections. The pool does the capacity accounting; an adapter only holds what is idle. Implement it to keep idle connections another way.