Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Fetch and…

Transform RMW to directly modify the shared variable (such as addition, subtraction, or bitwise AND, OR, XOR) and return its previous value, all as part of a single atomic operation. Compared with Exchange in Exchange, when programmers only need to make a simple modification to the shared variable, they can use Fetch-and….