Re:A lock-free, concurrent, generic queue in 32 bits
by bsaul on Saturday May 14, 2022 @05:25PM
(#31382676)
I’m confused by the infinite « while » : is it a common pattern of lock-free data structures ?
[ Parent
| on HN ]
Re:A lock-free, concurrent, generic queue in 32 bits
by codefreakxff on Saturday May 14, 2022 @06:07PM
(#31383107)
Do you mean this part
“This is a busy-wait loop, which makes for a simple illustration but isn’t ideal. In a real program I’d have the producer run a job while it waits for a queue slot, or just have it turn into a consumer (if this wasn’t a single-consumer queue)”