Skip to main content

Module engine

Module engine 

Source
Expand description

Engine: per-database concurrency control layer.

Wraps a Backend with:

  • Read semaphore (N concurrent reads)
  • Write mutex (1 serialized write at a time, auto-journaled)
  • Snapshot lock (shared across reads/writes, exclusive for CHECKPOINT)
  • Optional statement-level sandboxing

Uses tokio::spawn_blocking from the shared thread pool — zero threads when idle, scales across many databases in a multi-tenant process.

Structs§

Engine
Per-database query execution engine with concurrency control.