Features Overview¶
arrp provides a simple yet versatile set of tools for managing poolable resources in modern C++ applications.
Core Feature Areas¶
Resource Management
Learn about borrowing resources in FIFO order, seeding pre-allocated instances, factory callbacks for dynamic allocations, and invalidation mechanisms.
Threading & Lifetime Rules
Understand the thread-safety semantics of resource_pool<T> versus resource_guard<T>, object destruction rules, and pool cleanup handlers.
JSON & Diagnostics
Enable runtime statistics serialization via nlohmann/json, monitor metrics (loans, returns, abandons), and utilize native Visual Studio Natvis visualizers.
Summary of Capabilities¶
- Header-Only Library: Just add
include/siddiqsoft/arrp.hppto your project—no build step required. - Move-Only Guards: Prevents accidental copying or multi-thread data races on borrowed handles.
- Explicit Invalidation: Allows discarding corrupted or moved-out resources without returning them to pool rotation.
- Custom Shutdown Callbacks: Register cleanup hooks to execute when available resources are cleared or during pool destruction.
- Zero-Allocation Operation: When using pre-seeded resource pools, borrowing and returning perform no dynamic memory allocations.