Skip to main content

Module dropper

Module dropper 

Source
Expand description

Background value dropper for lazy free.

Expensive destructor work (dropping large lists, hashes, sorted sets) is offloaded to a dedicated OS thread so shard loops stay responsive. This is the same strategy Redis uses with its lazyfree threads.

The dropper runs as a plain std::thread rather than a tokio task because dropping data structures is CPU-bound work that would starve the async executor.

Structsยง

DropHandle
A cloneable handle for deferring expensive drops to the background thread.