presto-main/src/main/java/io/prestosql/operator/exchange/LocalExchangeSource.java/LocalExchangeSource/isFinished
class LocalExchangeSource:    public boolean isFinished()
    {
        synchronized (lock) {
            return finishing && buffer.isEmpty();
        }
    }