Skip to content

Instantly share code, notes, and snippets.

@chrisvest
Created January 7, 2017 16:24
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 chrisvest/69fe4daa1abf562c038718a365b5ce6c to your computer and use it in GitHub Desktop.
Save chrisvest/69fe4daa1abf562c038718a365b5ce6c to your computer and use it in GitHub Desktop.
class Handover {
private static class Node {
final Object value;
volatile Node next;
Node( Object value ) {
this.value = value;
}
}
private static final Node END = new Node( null );
private final AtomicReference<Node> stack = new AtomicReference<>( END );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment