pub enum BlockHint {
None,
Block {
kind: BlockKind,
keys: Vec<Vec<u8>>,
timeout_ms: u64,
},
}Expand description
How a command wants to block, if at all. Returned by
Commands::resolve inside crate::ResolvedCmd so the verb-table
lookup happens once per command. None is the zero-cost default for
every non-blocking verb (≥ 99.9 % of dispatches in steady state).
keys is every key the conn watches (≥ 1). The dispatcher picks the
park strategy from them:
- single key on the conn’s own shard → the in-shard fast path
(
BlockedClients): register + wake without any cross-core hop. - single remote key, or any multi-key form → the cross-shard
arbiter (
block_xshard): the conn parks on its origin shard and watch registrations fan out to each key’s owning shard.
For BLPOP / BRPOP the keys are list keys; for XREAD BLOCK /
XREADGROUP BLOCK they are the STREAMS keys (in request order).
Variants§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BlockHint
impl RefUnwindSafe for BlockHint
impl Send for BlockHint
impl Sync for BlockHint
impl Unpin for BlockHint
impl UnsafeUnpin for BlockHint
impl UnwindSafe for BlockHint
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more