smarty-prototypes / go-disruptor

A port of the LMAX Disruptor to the Go language.
Apache License 2.0
1.37k stars 212 forks source link

ringBuffer visibility discuss #13

Open 365318663 opened 1 year ago

365318663 commented 1 year ago

I would like to know how to guarantee that writing and reading of ringBuffer is thread safe. Because I found that the writing and reading of the ringBuffer are not locked, and the data that may be read may not be written into the ringBuffer. Because of the MESI protocol, it does not guarantee good visibility. image