presto-main/src/main/java/io/prestosql/operator/exchange/LocalExchangeSink.java/LocalExchangeSink/finish
class LocalExchangeSink:    public void finish()
    {
        if (finished.compareAndSet(false, true)) {
            exchanger.finish();
            onFinish.accept(this);
        }
    }