mercredi 31 août 2016

Data race in C++

struct S {
int a;
int b;
};

Size of L1 cache line is equal 64B.

global S s;
Thread1:
s.a = 2;

Thread2: 
s.b = 1;

Is it a data race in C++?

Aucun commentaire:

Enregistrer un commentaire