shihchengwei-lab commented on PR #55660:
URL: https://github.com/apache/arrow/pull/55660#issuecomment-7008394155

   If `ReadNext()` returns an error before end-of-stream in threaded mode, what 
ensures that `Close()` waits for `plan->finished()` before returning? The error 
breaks the read loop, and the only explicit wait I see is on the end-of-stream 
path. I haven’t tested this case. [Close 
implementation](https://github.com/apache/arrow/blob/e00ed633bdc02f9c24c655586c735705412c4751/cpp/src/arrow/dataset/scanner.cc#L144-L155)
 · [End-of-stream 
wait](https://github.com/apache/arrow/blob/e00ed633bdc02f9c24c655586c735705412c4751/cpp/src/arrow/dataset/scanner.cc#L556-L564)
 · [Documented 
guarantee](https://github.com/apache/arrow/blob/e00ed633bdc02f9c24c655586c735705412c4751/cpp/src/arrow/dataset/scanner.h#L461-L463)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to