Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add generic count down mechanism #3910

Closed
javanna opened this Issue Oct 15, 2013 · 0 comments

Comments

Projects
None yet
1 participant
@javanna
Copy link
Member

javanna commented Oct 15, 2013

In our code we often need to wait for multiple events to happen up to a timeout (mainly in the node acknowledgement logic), and we then notify some listener. We usually do it using an AtomicInteger to count down and an AtomicBoolean to check whether the notification has already been sent.

It would be nice to have a single way to achieve this, having a class (e.g. CountDown) that exposes this behaviour, which can be thoroughly tested and used whenever we need to.

@ghost ghost assigned javanna Oct 15, 2013

@s1monw s1monw closed this in 89de3ab Oct 15, 2013

mute pushed a commit to mute/elasticsearch that referenced this issue Jul 29, 2015

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.