↧
Answer by Kerrek SB for C++ atomics and cross-thread visibility
Cores themselves don't matter. The question is "how do all cores see the same memory update eventually", which is something your hardware does for you (e.g. cache coherency protocols). There is only...
View ArticleC++ atomics and cross-thread visibility
AFAIK C++ atomics (<atomic>) family provide 3 benefits:primitive instructions indivisibility (no dirty reads),memory ordering (both, for CPU and compiler) andcross-thread visibility/changes...
View Article