in folsom/src/main/java/com/spotify/folsom/client/BatchFlusher.java [72:84]
public void flush() {
if (eventLoop.inEventLoop()) {
pending++;
if (pending >= maxPending) {
pending = 0;
channel.flush();
}
}
if (woken == 0 && WOKEN.compareAndSet(this, 0, 1)) {
woken = 1;
eventLoop.execute(wakeup);
}
}