Skip to content

Commit fc77550

Browse files
committed
Try a stronger memory ordering constraint
1 parent 34e2687 commit fc77550

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/cpp/asyncappender.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ void AsyncAppender::append(const spi::LoggingEventPtr& event, Pool& p)
311311
priv->buffer[index] = AsyncAppenderPriv::EventData{event, pendingCount};
312312
// Notify the dispatch thread that an event has been added
313313
auto savedEventCount = oldEventCount;
314-
while (!priv->commitCount.compare_exchange_weak(oldEventCount, oldEventCount + 1, std::memory_order_release))
314+
while (!priv->commitCount.compare_exchange_weak(oldEventCount, oldEventCount + 1, std::memory_order_acq_rel))
315315
{
316316
oldEventCount = savedEventCount;
317317
}

0 commit comments

Comments
 (0)