boolean waitForPending(ResultCallback owner, long timeoutMs) {
        try {
            return owner.getPending().waitForZero(timeoutMs);
        } catch (InterruptedException e) {
            return false;
        }
    }
Waits until there are no more pending documents
for the given callback, or the timeout expires.

@param owner     The callback to check for.
@param timeoutMs The number of milliseconds to wait, or -1 to wait indefinitely.
@return true if there were no more pending, or false if the timeout expired.
vespaclient-core/src/main/java/com/yahoo/feedapi/SharedSender.java