Todos os livros

Profissional

Apps Sobre Coach Entrar Começar a ler

Quantitative Finance · Glossário

O que é Compare-and-swap?

Definition 11.3 Low-Latency Software · Capítulo 11 — Lock-Free Programming

Compare-and-swap (CAS) atomically replaces the value of a location with a new value if and only if it still equals an expected value, and reports whether it did. A CAS loop reads the current value, computes a new one, and retries the CAS until no other thread has changed the location in between.

Ler no capítulo →