Github user zsxwing commented on a diff in the pull request:
https://github.com/apache/spark/pull/20555#discussion_r168007713
--- Diff: core/src/main/java/org/apache/spark/io/ReadAheadInputStream.java
---
@@ -230,24 +227,32 @@ private void signalAsyncReadComplete() {
private void waitForAsyncReadComplete() throws IOException {
stateChangeLock.lock();
+ isWaiting.set(true);
try {
- while (readInProgress) {
+ if (readInProgress) {
--- End diff --
The while loop here is to handle [spurious
wakeup](https://en.wikipedia.org/wiki/Spurious_wakeup).
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]