Hacker News new | ask | show | jobs
by eloff 4536 days ago
There are different kinds of lock freedom, but in this case if you read carefully, that's a normal operating state and does not block consumers. It's the race I mentioned. The consumers have to be written to skip over a limited number of null entries and then check the actual producer index. In most cases that means a little extra iteration. It would be very rare to need check the producer index, which makes it fast.