|
JH-Toolkit v1.4.1
An engineering-oriented C++20 toolkit with duck-typed concepts, static design, async coroutines, and semantic containers — header-only, RTTI-free, and concurrency-friendly.
|
Aggregated namespace for concurrency-aware resource containers. More...
Namespaces | |
| namespace | extension |
Public customization and extension points for jh::conc containers. | |
Classes | |
| class | flat_pool |
| Hash-ordered, contiguous resource interning pool. More... | |
| class | occ_box |
| Generic container providing Optimistic Concurrency Control (OCC). More... | |
| class | pointer_pool |
| Weak pointer-observed pool for immutable or structurally immutable objects. More... | |
Functions | |
| template<typename... Boxes, typename... Funcs> | |
| bool | apply_to (std::tuple< Boxes &... > boxes, std::tuple< Funcs... > &&funcs) |
Apply functions to multiple occ_boxes atomically. | |
Aggregated namespace for concurrency-aware resource containers.
The <jh/concurrency> forwarding header provides a unified, engineering-oriented interface over the concurrency primitives implemented under jh/concurrent/.
Rather than exposing raw locking primitives or requiring users to reason about mutex choreography, jh::conc offers resource-centric containers that encapsulate synchronization internally. APIs are shaped around managed objects, keys, and handles, not explicit lock ownership.
This namespace aggregates facilities such as optimistic-concurrency boxes and pool-based containers with well-defined ownership, observation, and lifetime semantics.
The aggregated header <jh/concurrency> is the recommended entry point for accessing these components. Individual headers under jh/concurrent/ remain fully supported.
| bool jh::conc::apply_to | ( | std::tuple< Boxes &... > | boxes, |
| std::tuple< Funcs... > && | funcs ) |
Apply functions to multiple occ_boxes atomically.
Copy-based
void(T&). shared_ptr<T> instead of copying the old object. std::shared_ptr<T>(const std::shared_ptr<T>&). Both styles are mutually exclusive for a single transaction. Attempting to mix them will fail at compile time.
| Boxes | The set of occ_box types |
| Funcs | The set of functions (one per box) |
| boxes | Tuple of references to occ_boxes |
| funcs | Tuple of functions to apply |
true if commit succeeds, false otherwise.