Skip to main content

Module in_memory

Module in_memory 

Source
Expand description

In-process job queue: a topic map guarded by an RwLock plus one Mutex<Vec<Job>> + Notify per topic.

Both locks are synchronous. Neither is ever held across an .await, so there is nothing for an async mutex to buy here — and a std mutex avoids the waker-list bookkeeping an async one pays on every acquisition. Topic lookup takes the map’s read lock, so producers and consumers on the same topic do not serialize on a global lock.

Structs§

InMemoryQueue
An in-memory queue. Each topic is a shared mutex-protected vector + Notify.