Skip to main content

Module memory

Module memory 

Source
Expand description

The in-process driver: the default, and the one tests use.

Everything lives behind one Mutex. A queue is not a cache — it is a sequencing device, and every operation on it has to agree with every other about what the head of the queue is — so sharding would buy nothing but a way to hand the same job to two workers.

No lock is ever held across an await, which is why a plain std mutex is the right one here rather than Tokio’s.

Structs§

MemoryQueue
A process-local queue. Cloning shares one store, so it can be registered as application state and handed to every handler and worker.