private void decrementLocallyProcessingCounter() {
        assert(locallyProcessingCount > 0);
        --locallyProcessingCount;
        // Visitor continuation and completion is edge-triggered (primarily from replies
        // being received), so if there are no other events that can trigger a completion,
        // we have to do this explicitly.
        if (locallyProcessingCount == 0 && pendingMessageCount == 0) {
            continueVisiting();
        }
    }
NOTE: not called from within lock, function must take lock itself
documentapi/src/main/java/com/yahoo/documentapi/messagebus/MessageBusVisitorSession.java