Created
January 7, 2017 16:31
-
-
Save chrisvest/01210093e0aac943108985cbb74eb1fd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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