Skip to content

Instantly share code, notes, and snippets.

@mmathys
Created August 10, 2018 09:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mmathys/87c4191d9206171d012cf7226970fbc4 to your computer and use it in GitHub Desktop.
Save mmathys/87c4191d9206171d012cf7226970fbc4 to your computer and use it in GitHub Desktop.
atomic {
if(exp1 != val1.get() || exp2 != val2.get()) {
return false;
}
val1.set(up1);
val2.set(up2);
return true;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment