4 ms·
Lockfree means one thread is always making progress. If two threads contend over an atomic operation, one succeeds and one fails. If you spend some time using
by CyberDildonics 4y ago
Lockfree means one thread is always making progress. If two threads contend over an atomic operation, one succeeds and one fails.
If you spend some time using atomics they might not seem so scary anymore.
- sylware 4y agoboth threads can make progress at the same time.
- CyberDildonics 4y agoLockfree means at least one thread is always making progress and atomics allow that trivially. If an atomic operation fails it means that a different thread's atomic operation succeeded. I didn't make up this definition. https://en.wikipedia.org/wiki/Non-blocking_algorithm#Lock-freedom https://en.wikipedia.org/wiki/Non-blocking_algorithm#Lock-fr...
- sylware 4y ago