Closed esrrhs closed 10 months ago
so if I use the queue a long time, the size_t will has the same problem. or this is just ok? because the time may be very long?
I run a test at my computer, found there will be thousand of years to make the size_t overflow. okay, I should not consider that situation :)
Yeah, the idea is that the 64 bit counter is huge and will never overflow. You bring up a good point, it would be nice to find a way to cleanly handle the overflow.
On Mon, Sep 18, 2023 at 7:39 AM esrrhs @.***> wrote:
Closed #40 https://github.com/rigtorp/MPMCQueue/issues/40 as completed.
— Reply to this email directly, view it on GitHub https://github.com/rigtorp/MPMCQueue/issues/40#event-10397442183, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABLO2433QBGIJFFQ5HH4DDX3A6IHANCNFSM6AAAAAA44SYUFE . You are receiving this because you are subscribed to this thread.Message ID: @.***>
I read the code, and found if the head overflow, then it can't Push anymore. and I change the head type from size_t to uint16_t, and just run code:
and then it stop cout at 65535 and then dead