Skip to content

Commit 08c295d

Browse files
authored
Merge pull request #93 from AGSaidi/padding
Pad out ReaderWriterQueue to a whole cache line (avoids false sharing)
2 parents db18f8d + 981a1d3 commit 08c295d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

readerwriterqueue.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
namespace moodycamel {
5959

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

0 commit comments

Comments
 (0)