Skip to content

Commit

Permalink
Try a stronger memory ordering constraint
Browse files Browse the repository at this point in the history
  • Loading branch information
stephen-webb committed Oct 16, 2024
1 parent 34e2687 commit fc77550
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/cpp/asyncappender.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ void AsyncAppender::append(const spi::LoggingEventPtr& event, Pool& p)
priv->buffer[index] = AsyncAppenderPriv::EventData{event, pendingCount};
// Notify the dispatch thread that an event has been added
auto savedEventCount = oldEventCount;
while (!priv->commitCount.compare_exchange_weak(oldEventCount, oldEventCount + 1, std::memory_order_release))
while (!priv->commitCount.compare_exchange_weak(oldEventCount, oldEventCount + 1, std::memory_order_acq_rel))
{
oldEventCount = savedEventCount;
}
Expand Down

0 comments on commit fc77550

Please sign in to comment.