Skip to content

Commit

Permalink
Merge pull request cameron314#93 from AGSaidi/padding
Browse files Browse the repository at this point in the history
Pad out ReaderWriterQueue to a whole cache line (avoids false sharing)
  • Loading branch information
cameron314 authored Jul 7, 2020
2 parents db18f8d + 981a1d3 commit 08c295d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion readerwriterqueue.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
namespace moodycamel {

template<typename T, size_t MAX_BLOCK_SIZE = 512>
class ReaderWriterQueue
class AE_ALIGN(MOODYCAMEL_CACHE_LINE_SIZE) ReaderWriterQueue
{
// Design: Based on a queue-of-queues. The low-level queues are just
// circular buffers with front and tail indices indicating where the
Expand Down

0 comments on commit 08c295d

Please sign in to comment.