Created
April 28, 2015 03:39
-
-
Save mikeb01/d1a7a338b151b400a4bc 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
RingBuffer<ValueEvent<String>> ringBuffer = new RingBuffer<>(...); | |
String data = "ABC"; | |
long next = ringBuffer.next(); | |
try | |
{ | |
ValueEvent<String> event = ringBuffer.get(next); | |
event.set(data); | |
} | |
finally | |
{ | |
ringBuffer.publish(next); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment