src/com/amazon/kinesis/streaming/agent/tailing/AsyncPublisher.java [78:96]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        waitForIdle(NO_TIMEOUT, TimeUnit.MILLISECONDS);
    }

    /**
     * @param timeout Use a value {@code <= 0} to wait indefinitely.
     * @param unit
     * @return {@code true} if idle state was reached before the timeout
     *         expired, or {@code false} if idle state was not successfully
     *         reached.
     */
    public boolean waitForIdle(long timeout, TimeUnit unit) {
        Stopwatch timer = Stopwatch.createStarted();
        while(!isIdle()) {
            long remaining = timeout > 0 ?
                    (unit.toMillis(timeout) - timer.elapsed(TimeUnit.MILLISECONDS))
                    : Long.MAX_VALUE;
            if(remaining <= 0)
                return false;
            long sleepTime = Math.min(MAX_SPIN_WAIT_TIME_MILLIS, remaining);
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



src/com/amazon/kinesis/streaming/agent/tailing/FileTailer.java [179:197]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        waitForIdle(NO_TIMEOUT, TimeUnit.MILLISECONDS);
    }

    /**
     * @param timeout Use a value {@code <= 0} to wait indefinitely.
     * @param unit
     * @return {@code true} if idle state was reached before the timeout
     *         expired, or {@code false} if idle state was not successfully
     *         reached.
     */
    public boolean waitForIdle(long timeout, TimeUnit unit) {
        Stopwatch timer = Stopwatch.createStarted();
        while(!isIdle()) {
            long remaining = timeout > 0 ?
                    (unit.toMillis(timeout) - timer.elapsed(TimeUnit.MILLISECONDS))
                    : Long.MAX_VALUE;
            if(remaining <= 0)
                return false;
            long sleepTime = Math.min(MAX_SPIN_WAIT_TIME_MILLIS, remaining);
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



