jaulib v1.3.6
Jau Support Library (C++, Java, ..)
|
Concurrency support to avoid data races and help to synchronize access. More...
Classes | |
class | jau::latch |
Inspired by std::latch of C++20. More... | |
struct | jau::ordered_atomic< _Tp, _MO > |
std::atomic<T> type with predefined fixed std::memory_order, not allowing changing the memory model on usage and applying the set order to all operator. More... | |
class | jau::RecursiveLock |
class | jau::sc_atomic_critical |
This class provides a RAII-style Sequentially Consistent (SC) data race free (DRF) critical block. More... | |
class | jau::service_runner |
Service runner, a reusable dedicated thread performing custom user services. More... | |
class | jau::simple_timer |
A simple timer for timeout and interval applications, using one dedicated service_runner thread per instance. More... | |
Typedefs | |
typedef ordered_atomic< bool, std::memory_order_relaxed > | jau::relaxed_atomic_bool |
Relaxed non-SC atomic integral scalar boolean. | |
typedef ordered_atomic< int, std::memory_order_relaxed > | jau::relaxed_atomic_int |
Relaxed non-SC atomic integral scalar integer. | |
typedef ordered_atomic< int16_t, std::memory_order_relaxed > | jau::relaxed_atomic_int16 |
Relaxed non-SC atomic integral scalar int16_t. | |
typedef ordered_atomic< int32_t, std::memory_order_relaxed > | jau::relaxed_atomic_int32 |
Relaxed non-SC atomic integral scalar int32_t. | |
typedef ordered_atomic< int64_t, std::memory_order_relaxed > | jau::relaxed_atomic_int64 |
Relaxed non-SC atomic integral scalar int64_t. | |
typedef ordered_atomic< int8_t, std::memory_order_relaxed > | jau::relaxed_atomic_int8 |
Relaxed non-SC atomic integral scalar int8_t. | |
typedef ordered_atomic< jau::nsize_t, std::memory_order_relaxed > | jau::relaxed_atomic_nsize_t |
Relaxed non-SC atomic integral scalar jau::nsize_t. | |
typedef ordered_atomic< std::size_t, std::memory_order_relaxed > | jau::relaxed_atomic_size_t |
Relaxed non-SC atomic integral scalar size_t. | |
typedef ordered_atomic< jau::snsize_t, std::memory_order_relaxed > | jau::relaxed_atomic_snsize_t |
Relaxed non-SC atomic integral scalar jau::snsize_t. | |
typedef ordered_atomic< ssize_t, std::memory_order_relaxed > | jau::relaxed_atomic_ssize_t |
Relaxed non-SC atomic integral scalar ssize_t. | |
typedef ordered_atomic< uint16_t, std::memory_order_relaxed > | jau::relaxed_atomic_uint16 |
Relaxed non-SC atomic integral scalar uint16_t. | |
typedef ordered_atomic< uint32_t, std::memory_order_relaxed > | jau::relaxed_atomic_uint32 |
Relaxed non-SC atomic integral scalar uint32_t. | |
typedef ordered_atomic< uint64_t, std::memory_order_relaxed > | jau::relaxed_atomic_uint64 |
Relaxed non-SC atomic integral scalar uint64_t. | |
typedef ordered_atomic< uint8_t, std::memory_order_relaxed > | jau::relaxed_atomic_uint8 |
Relaxed non-SC atomic integral scalar uint8_t. | |
typedef ordered_atomic< bool, std::memory_order_seq_cst > | jau::sc_atomic_bool |
SC atomic integral scalar boolean. | |
typedef ordered_atomic< int, std::memory_order_seq_cst > | jau::sc_atomic_int |
SC atomic integral scalar integer. | |
typedef ordered_atomic< int16_t, std::memory_order_seq_cst > | jau::sc_atomic_int16 |
SC atomic integral scalar int16_t. | |
typedef ordered_atomic< int32_t, std::memory_order_seq_cst > | jau::sc_atomic_int32 |
SC atomic integral scalar int32_t. | |
typedef ordered_atomic< int64_t, std::memory_order_seq_cst > | jau::sc_atomic_int64 |
SC atomic integral scalar int64_t. | |
typedef ordered_atomic< int8_t, std::memory_order_seq_cst > | jau::sc_atomic_int8 |
SC atomic integral scalar int8_t. | |
typedef ordered_atomic< jau::nsize_t, std::memory_order_seq_cst > | jau::sc_atomic_nsize_t |
SC atomic integral scalar jau::nsize_t. | |
typedef ordered_atomic< std::size_t, std::memory_order_seq_cst > | jau::sc_atomic_size_t |
SC atomic integral scalar size_t. | |
typedef ordered_atomic< jau::snsize_t, std::memory_order_seq_cst > | jau::sc_atomic_snsize_t |
SC atomic integral scalar jau::snsize_t. | |
typedef jau::ordered_atomic< ssize_t, std::memory_order_seq_cst > | jau::sc_atomic_ssize_t |
SC atomic integral scalar ssize_t. | |
typedef ordered_atomic< uint16_t, std::memory_order_seq_cst > | jau::sc_atomic_uint16 |
SC atomic integral scalar uint16_t. | |
typedef ordered_atomic< uint32_t, std::memory_order_seq_cst > | jau::sc_atomic_uint32 |
SC atomic integral scalar uint32_t. | |
typedef ordered_atomic< uint64_t, std::memory_order_seq_cst > | jau::sc_atomic_uint64 |
SC atomic integral scalar uint64_t. | |
typedef ordered_atomic< uint8_t, std::memory_order_seq_cst > | jau::sc_atomic_uint8 |
SC atomic integral scalar uint8_t. | |
Functions | |
template<typename _Tp, std::memory_order _MO> | |
std::string | jau::to_string (const ordered_atomic< _Tp, _MO > &ref) |
Concurrency support to avoid data races and help to synchronize access.
Notable, the following data structures from Data Structures are supporting concurrency:
Further, Fraction Arithmetic and Time are supporting concurrency:
typedef ordered_atomic<bool, std::memory_order_seq_cst> jau::sc_atomic_bool |
SC atomic integral scalar boolean.
Memory-Model (MM) guaranteed sequential consistency (SC) between acquire (read) and release (write)
Definition at line 259 of file ordered_atomic.hpp.
typedef ordered_atomic<bool, std::memory_order_relaxed> jau::relaxed_atomic_bool |
Relaxed non-SC atomic integral scalar boolean.
Memory-Model (MM) only guarantees the atomic value, no sequential consistency (SC) between acquire (read) and release (write).
Definition at line 262 of file ordered_atomic.hpp.
typedef ordered_atomic<int8_t, std::memory_order_seq_cst> jau::sc_atomic_int8 |
SC atomic integral scalar int8_t.
Memory-Model (MM) guaranteed sequential consistency (SC) between acquire (read) and release (write)
Definition at line 265 of file ordered_atomic.hpp.
typedef ordered_atomic<int8_t, std::memory_order_relaxed> jau::relaxed_atomic_int8 |
Relaxed non-SC atomic integral scalar int8_t.
Memory-Model (MM) only guarantees the atomic value, no sequential consistency (SC) between acquire (read) and release (write).
Definition at line 268 of file ordered_atomic.hpp.
typedef ordered_atomic<uint8_t, std::memory_order_seq_cst> jau::sc_atomic_uint8 |
SC atomic integral scalar uint8_t.
Memory-Model (MM) guaranteed sequential consistency (SC) between acquire (read) and release (write)
Definition at line 271 of file ordered_atomic.hpp.
typedef ordered_atomic<uint8_t, std::memory_order_relaxed> jau::relaxed_atomic_uint8 |
Relaxed non-SC atomic integral scalar uint8_t.
Memory-Model (MM) only guarantees the atomic value, no sequential consistency (SC) between acquire (read) and release (write).
Definition at line 274 of file ordered_atomic.hpp.
typedef ordered_atomic<int16_t, std::memory_order_seq_cst> jau::sc_atomic_int16 |
SC atomic integral scalar int16_t.
Memory-Model (MM) guaranteed sequential consistency (SC) between acquire (read) and release (write)
Definition at line 277 of file ordered_atomic.hpp.
typedef ordered_atomic<int16_t, std::memory_order_relaxed> jau::relaxed_atomic_int16 |
Relaxed non-SC atomic integral scalar int16_t.
Memory-Model (MM) only guarantees the atomic value, no sequential consistency (SC) between acquire (read) and release (write).
Definition at line 280 of file ordered_atomic.hpp.
typedef ordered_atomic<uint16_t, std::memory_order_seq_cst> jau::sc_atomic_uint16 |
SC atomic integral scalar uint16_t.
Memory-Model (MM) guaranteed sequential consistency (SC) between acquire (read) and release (write)
Definition at line 283 of file ordered_atomic.hpp.
typedef ordered_atomic<uint16_t, std::memory_order_relaxed> jau::relaxed_atomic_uint16 |
Relaxed non-SC atomic integral scalar uint16_t.
Memory-Model (MM) only guarantees the atomic value, no sequential consistency (SC) between acquire (read) and release (write).
Definition at line 286 of file ordered_atomic.hpp.
typedef ordered_atomic<int, std::memory_order_seq_cst> jau::sc_atomic_int |
SC atomic integral scalar integer.
Memory-Model (MM) guaranteed sequential consistency (SC) between acquire (read) and release (write)
Definition at line 289 of file ordered_atomic.hpp.
typedef ordered_atomic<int, std::memory_order_relaxed> jau::relaxed_atomic_int |
Relaxed non-SC atomic integral scalar integer.
Memory-Model (MM) only guarantees the atomic value, no sequential consistency (SC) between acquire (read) and release (write).
Definition at line 292 of file ordered_atomic.hpp.
typedef ordered_atomic<int32_t, std::memory_order_seq_cst> jau::sc_atomic_int32 |
SC atomic integral scalar int32_t.
Memory-Model (MM) guaranteed sequential consistency (SC) between acquire (read) and release (write)
Definition at line 295 of file ordered_atomic.hpp.
typedef ordered_atomic<int32_t, std::memory_order_relaxed> jau::relaxed_atomic_int32 |
Relaxed non-SC atomic integral scalar int32_t.
Memory-Model (MM) only guarantees the atomic value, no sequential consistency (SC) between acquire (read) and release (write).
Definition at line 298 of file ordered_atomic.hpp.
typedef ordered_atomic<uint32_t, std::memory_order_seq_cst> jau::sc_atomic_uint32 |
SC atomic integral scalar uint32_t.
Memory-Model (MM) guaranteed sequential consistency (SC) between acquire (read) and release (write)
Definition at line 301 of file ordered_atomic.hpp.
typedef ordered_atomic<uint32_t, std::memory_order_relaxed> jau::relaxed_atomic_uint32 |
Relaxed non-SC atomic integral scalar uint32_t.
Memory-Model (MM) only guarantees the atomic value, no sequential consistency (SC) between acquire (read) and release (write).
Definition at line 304 of file ordered_atomic.hpp.
typedef ordered_atomic<jau::nsize_t, std::memory_order_seq_cst> jau::sc_atomic_nsize_t |
SC atomic integral scalar jau::nsize_t.
Memory-Model (MM) guaranteed sequential consistency (SC) between acquire (read) and release (write)
Definition at line 307 of file ordered_atomic.hpp.
typedef ordered_atomic<jau::snsize_t, std::memory_order_seq_cst> jau::sc_atomic_snsize_t |
SC atomic integral scalar jau::snsize_t.
Memory-Model (MM) guaranteed sequential consistency (SC) between acquire (read) and release (write)
Definition at line 310 of file ordered_atomic.hpp.
typedef ordered_atomic<jau::nsize_t, std::memory_order_relaxed> jau::relaxed_atomic_nsize_t |
Relaxed non-SC atomic integral scalar jau::nsize_t.
Memory-Model (MM) only guarantees the atomic value, no sequential consistency (SC) between acquire (read) and release (write).
Definition at line 313 of file ordered_atomic.hpp.
typedef ordered_atomic<jau::snsize_t, std::memory_order_relaxed> jau::relaxed_atomic_snsize_t |
Relaxed non-SC atomic integral scalar jau::snsize_t.
Memory-Model (MM) only guarantees the atomic value, no sequential consistency (SC) between acquire (read) and release (write).
Definition at line 316 of file ordered_atomic.hpp.
typedef ordered_atomic<std::size_t, std::memory_order_seq_cst> jau::sc_atomic_size_t |
SC atomic integral scalar size_t.
Memory-Model (MM) guaranteed sequential consistency (SC) between acquire (read) and release (write)
Definition at line 319 of file ordered_atomic.hpp.
typedef jau::ordered_atomic<ssize_t, std::memory_order_seq_cst> jau::sc_atomic_ssize_t |
SC atomic integral scalar ssize_t.
Memory-Model (MM) guaranteed sequential consistency (SC) between acquire (read) and release (write)
Definition at line 322 of file ordered_atomic.hpp.
typedef ordered_atomic<std::size_t, std::memory_order_relaxed> jau::relaxed_atomic_size_t |
Relaxed non-SC atomic integral scalar size_t.
Memory-Model (MM) only guarantees the atomic value, no sequential consistency (SC) between acquire (read) and release (write).
Definition at line 325 of file ordered_atomic.hpp.
typedef ordered_atomic<ssize_t, std::memory_order_relaxed> jau::relaxed_atomic_ssize_t |
Relaxed non-SC atomic integral scalar ssize_t.
Memory-Model (MM) only guarantees the atomic value, no sequential consistency (SC) between acquire (read) and release (write).
Definition at line 328 of file ordered_atomic.hpp.
typedef ordered_atomic<int64_t, std::memory_order_seq_cst> jau::sc_atomic_int64 |
SC atomic integral scalar int64_t.
Memory-Model (MM) guaranteed sequential consistency (SC) between acquire (read) and release (write)
Definition at line 331 of file ordered_atomic.hpp.
typedef ordered_atomic<int64_t, std::memory_order_relaxed> jau::relaxed_atomic_int64 |
Relaxed non-SC atomic integral scalar int64_t.
Memory-Model (MM) only guarantees the atomic value, no sequential consistency (SC) between acquire (read) and release (write).
Definition at line 334 of file ordered_atomic.hpp.
typedef ordered_atomic<uint64_t, std::memory_order_seq_cst> jau::sc_atomic_uint64 |
SC atomic integral scalar uint64_t.
Memory-Model (MM) guaranteed sequential consistency (SC) between acquire (read) and release (write)
Definition at line 337 of file ordered_atomic.hpp.
typedef ordered_atomic<uint64_t, std::memory_order_relaxed> jau::relaxed_atomic_uint64 |
Relaxed non-SC atomic integral scalar uint64_t.
Memory-Model (MM) only guarantees the atomic value, no sequential consistency (SC) between acquire (read) and release (write).
Definition at line 340 of file ordered_atomic.hpp.
std::string jau::to_string | ( | const ordered_atomic< _Tp, _MO > & | ref | ) |
Definition at line 253 of file ordered_atomic.hpp.