samedi 13 mai 2023

Why does A inter-thread happens-before C?

"if A synchronizes with B and B is sequenced before C, then A inter-thread happens-before C". What confuses me is that B and C are in the same thread. The compiler or CPU can reorder the instruction. why does A inter-thread always happen-before C? It seems that sequence-before makes no sense since reordering can happen.

Aucun commentaire:

Enregistrer un commentaire