Skip to content

Commit 18e75ee

Browse files
committed
Revert "Backport atomic from pynest-ng to avoid data race" because it introduces a new data race.
This reverts commit c4ed2c4.
1 parent 8839f36 commit 18e75ee

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

sli/token.h

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -359,15 +359,7 @@ class Token
359359
Datum*
360360
datum() const
361361
{
362-
if ( not accessed_ )
363-
{
364-
// The if() above avoids any unnecessary updates, atomic prevents any potential
365-
// data races in case the compiler does behind-the-scences magic.
366-
// Backport from pynest-ng.
367-
#pragma omp atomic write
368-
accessed_ = true;
369-
}
370-
362+
accessed_ = true;
371363
return p;
372364
}
373365

0 commit comments

Comments
 (0)