Skip to content
Snippets Groups Projects
Commit 9bcdddda authored by Florian Schmaus's avatar Florian Schmaus
Browse files

[UnboundedBlockingMpscQueue] Improve readability, do not call load()

There is no need to call load() on std::atomic if the default memory
order is used.
parent 6eca961a
No related branches found
No related tags found
No related merge requests found
...@@ -54,7 +54,7 @@ class UnboundedBlockingMpscQueue : public Blockable<LogSubsystem::U_B_MPSC_Q> { ...@@ -54,7 +54,7 @@ class UnboundedBlockingMpscQueue : public Blockable<LogSubsystem::U_B_MPSC_Q> {
// Micro optimization, see if there is a blocked context // Micro optimization, see if there is a blocked context
// before performing the atomic exchange operation. // before performing the atomic exchange operation.
if (blockedContext.load() != nullptr) { if (blockedContext != nullptr) {
tryToWakeupBlockedContext<callerEnvironment>(); tryToWakeupBlockedContext<callerEnvironment>();
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment