Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
void popAll( Consumer<Object> consumer ) {
Node nodes = stack.getAndSet( END );
while ( nodes != END ) {
consumer.accept( nodes.value );
Node next;
do {
next = nodes.next;
} while ( next == null );
nodes = next;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.