Parking Lot

A Rust library for resource-aware background work, bounded execution and collecting results after the request that started them has returned.

Released v0.3.0 on crates.io · 24 Oct 2026

Key facts

How it works
Each task declares a cost; a pool starts it when the cost fits free capacity and parks it otherwise.
Ordering
Parked tasks start by priority, then in submission order; a task costing more than the pool's capacity is rejected.
Durable mode
Tasks can be parked in a Postgres or redb queue so accepted work survives a crash.
Registry
Published on crates.io; registry publication is not runtime qualification.
Used by
The Candle-VLLM Prometheus fork submits completion and streaming work through a pool.

Questions worth asking

  • When would I use Parking Lot?
  • How does Parking Lot decide which task starts next?
  • Can Parking Lot keep work across a crash?

Sources