Skip to content

Commit 49d2de8

Browse files
committed
Fix failure order, should be relaxed not release.
1 parent dd5691e commit 49d2de8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/LockLessMultiReadPipe.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ namespace enki
125125
// Multiple potential readers mean we should check if the data is valid,
126126
// using an atomic compare exchange
127127
uint32_t previous = FLAG_CAN_READ;
128-
bool bSuccess = m_Flags[ actualReadIndex ].compare_exchange_strong( previous, FLAG_INVALID, std::memory_order_acq_rel, std::memory_order_release );
128+
bool bSuccess = m_Flags[ actualReadIndex ].compare_exchange_strong( previous, FLAG_INVALID, std::memory_order_acq_rel, std::memory_order_relaxed );
129129
if( bSuccess )
130130
{
131131
break;

0 commit comments

Comments
 (0)