Skip to content

Instantly share code, notes, and snippets.

@prydin
Created December 19, 2019 17:24
Embed
What would you like to do?
Locking pseudo code
int waiters = 0;
void acquireLock() {
if(atomicIncrement(waiters) == 0) {
rerurn;
}
callSlowAndPainfulLockingLogic();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment