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.
Loading...
Searching...
No Matches
jh::sync Namespace Reference

Aggregated entry point for synchronization and coordination facilities. More...

Namespaces

namespace  ipc
 Synchronous inter-process coordination primitives.

Classes

class  const_lock
 Scope-based immutability barrier for mutex_like types. More...
class  control_buf
 Fixed-capacity, block-allocated container for control-only types (e.g., mutexes, atomics). More...
class  strong_unique_lock
 Strong exclusive lock adapter. More...
class  strong_shared_lock
 Strong shared (reader) lock adapter. More...

Typedefs

template<jh::concepts::basic_lockable Mtx>
using posix_smtx_unique_lock = std::unique_lock<Mtx>
 POSIX native exclusive lock alias.
template<jh::concepts::shared_lockable Mtx>
using posix_smtx_shared_lock = std::shared_lock<Mtx>
 POSIX native shared lock alias.

Detailed Description

Aggregated entry point for synchronization and coordination facilities.

The <jh/sync> forwarding header provides a unified, engineering-oriented interface over the synchronization components implemented under jh/synchronous/.
This module focuses on deterministic, low-level synchronization primitives with explicit lifetime, ownership, and memory semantics.
Rather than introducing policy-heavy frameworks, jh::sync exposes composable building blocks such as const-correct lock guards, stable-address control containers, and OS-backed inter-process synchronization facilities.

Typedef Documentation

◆ posix_smtx_shared_lock

using jh::sync::posix_smtx_shared_lock = std::shared_lock<Mtx>

POSIX native shared lock alias.

On POSIX systems this aliases std::shared_lock directly, relying on the native pthread-backed shared mutex semantics.

No additional language-level strengthening is applied.

Note
On Windows, this alias uses strong_shared_lock to approximate POSIX-style behavior.

◆ posix_smtx_unique_lock

using jh::sync::posix_smtx_unique_lock = std::unique_lock<Mtx>

POSIX native exclusive lock alias.

On POSIX systems this aliases std::unique_lock directly, relying on the underlying pthread-based implementation.

No additional language-level strengthening is applied.

Note
On Windows, this alias uses strong_unique_lock to approximate POSIX-style behavior.