4 ms·
Because the queue grows only in one direction and it is consumed in the other direction, reading a stale value from the other side is still safe, so two-word at
by gpderetta 5y ago
Because the queue grows only in one direction and it is consumed in the other direction, reading a stale value from the other side is still safe, so two-word atomicity is not needed.
In fact the other side value is normally cached in a local memory location so to amortize the cost of roundtrips over multiple reads and writes.
- deleted 5y ago[deleted]
- deleted 5y ago[deleted]
- yvdriess 5y agoOnly for SPSC. You need H/T consistency in other cases for full/empty checks. Cmon AMD/Intel, give us hardware queues already :)