Skip to content

Commit

Permalink
cache align members in Unbounded queue (minor)
Browse files Browse the repository at this point in the history
  • Loading branch information
odygrd committed Nov 4, 2023
1 parent 704258e commit a33d3a1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions quill/include/quill/detail/spsc_queue/UnboundedQueue.h
Original file line number Diff line number Diff line change
Expand Up @@ -240,10 +240,10 @@ class UnboundedQueue
}

private:
/** Modified by either the producer or consumer but never both */
Node* _producer{nullptr};
Node* _consumer{nullptr};
bool _huge_pages;
/** Modified by either the producer or consumer but never both */
alignas(CACHE_LINE_ALIGNED) Node* _producer{nullptr};
alignas(CACHE_LINE_ALIGNED) Node* _consumer{nullptr};
};

} // namespace quill::detail

0 comments on commit a33d3a1

Please sign in to comment.