Overview
ISO/IEC TS 9922:2024 - "Programming Languages - Technical specification for C++ extensions for concurrency 2" - is an ISO technical specification that extends ISO/IEC 14882:2020 (C++) by describing experimental concurrency interfaces for invoking algorithms with concurrent execution. The document is published as differences from the base standard and is intended as vendor guidance to build widespread practice for concurrency features that may be considered for future standardization.
Key topics and requirements
-
Experimental namespace & headers: New interfaces are provided in the std::experimental::inline::concurrency_v2 namespace and in headers such as:
- Feature-test macros: Implementations supplying these extensions should define feature-test macros (for example __cpp_lib_experimental_synchronized_value, __cpp_lib_experimental_hazard_pointer, etc.) associated with the experimental headers and values.
- Synchronized Value: A class template synchronized_value wraps a T and offers locked access via an apply(...) function. apply acquires locks (scoped_lock) for all provided synchronized_value objects, invokes a callable while holding the lock(s), and enforces constraints (e.g., the same synchronized_value cannot be passed more than once).
- Safe reclamation: The specification adds memory-reclamation techniques used to resolve access-deletion races:
- Hazard pointers: Defines hazard_pointer objects, hazard_pointer_domain, hazard_pointer_obj_base, make_hazard_pointer(), hazard_pointer_clean_up(), and semantics for protection epochs, retirement, and reclamation guarantees.
- Read-Copy Update (RCU): RCU-related interfaces are included to support another common safe-reclamation pattern (documented in the header).
- Atomic and ordering primitives: Definitions for bytewise atomic memcpy and asymmetric fences are included to address fine-grained atomic-copy and asymmetric memory-fence needs across architectures.
- Conformance: Conformance is defined with respect to program behavior when applying this TS together with ISO/IEC 14882:2020.
Applications
- Implementing concurrent algorithms and data structures in C++ that require:
- Race-free locked access patterns (synchronized_value)
- Lock-free memory reclamation (hazard pointers, RCU)
- Low-level atomic copy and fence semantics (bytewise atomic memcpy, asymmetric fence)
- Library and runtime vendors who want to provide experimental concurrency extensions to users
- Systems and embedded programmers needing portable concurrency primitives across architectures
Who should use this standard
- C++ library implementers and compiler vendors
- Concurrency library authors and systems programmers
- Teams evaluating future additions to the C++ algorithms and concurrency library
Related standards
Keywords: ISO/IEC TS 9922:2024, C++ concurrency, synchronized_value, hazard pointers, RCU, bytewise atomic memcpy, asymmetric fence, experimental headers, concurrency_v2.