MS
Size: a a a
MS
АК
MS
АК
MS
MS
MS
АК
m
is_always_lockfree == true
.АК
std::atomic<std::shared_ptr<const FUNCTIONS>> pool;итерация:
for (const auto& f : *pool) {модификация:
f();
}
FUNCTIONS functions = *pool;
functions.erase(..)
pool = std::make_shared<const FUNCTIONS>(std::move(functions));
MS
std::atomic<std::shared_ptr<const FUNCTIONS>> pool;итерация:
for (const auto& f : *pool) {модификация:
f();
}
FUNCTIONS functions = *pool;
functions.erase(..)
pool = std::make_shared<const FUNCTIONS>(std::move(functions));
АК
const FUNCTIONS
, они иммутабельныMS
АК
m
is_always_lockfree == true
.АК
MS
MS
АК