flâneur — a map of the web's best reading

Compare-and-swap

en.wikipedia.org · 2,728 words · saved by 1 readers

Couldn't find lead section for Compare-and-swap

Compare-and-swap - Wikipedia Jump to content From Wikipedia, the free encyclopedia Atomic computer processor instruction In computer science , compare-and-swap ( CAS ) is an atomic instruction used in multithreading to achieve synchronization. It compares the contents of a memory location with a given (the previous) value and, only if they are the same, modifies the contents of that memory location to a new given value. This is done as a single atomic operation. The atomicity guarantees that the new value is calculated based on up-to-date information; if the value had been updated by another t

Explore this link on the map →

related reading