Hacker News new | ask | show | jobs
by mark-r 3479 days ago
If you do that then the size() function becomes a problem. The original implementation relies on unsigned integer wrap-around to give the proper result when write < read.
1 comments

That is fairly easy to fix, though. Add N to the size value you get until its non-negative.