2 ms·
When there's heavy amount of updates, CAS loop updates will start to fail, so it needs to be retried the more the more there is contention. Fetch-and-add is to
by vardump 11y ago
When there's heavy amount of updates, CAS loop updates will start to fail, so it needs to be retried the more the more there is contention.
Fetch-and-add is totally wait-free, much better upper bound. It always succeeds on first try.
- jberryman 11y agoI can confirm. If you're curious I wrote a fast concurrent (single process) queue library for Haskell based around fetch-and-add: https://github.com/jberryman/unagi-chan https://github.com/jberryman/unagi-chan Interested to check out your work! I'd love to be able to extend my library to support IPC in some way.