Skip to content

Commit

Permalink
Update AsyncIterator.scala
Browse files Browse the repository at this point in the history
  • Loading branch information
nh13 authored Dec 27, 2021
1 parent 13d2a0a commit 79f06c7
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class AsyncIterator[T](private val source: Iterator[T], bufferSize: Option[Int]

// Get the next item, or wait until the underlying thread is done and there are no more items in the queue
while (buffer.isEmpty && !(this.done && this.queue.isEmpty)) {
checkAndRaise() // check if hte underlying thread raised an exception
checkAndRaise() // check if the underlying thread raised an exception
tryAndModifyInterruptedException("Interrupted waiting on taking from the queue.") {
buffer = Option(this.queue.poll(50, TimeUnit.MILLISECONDS))
}
Expand Down Expand Up @@ -96,4 +96,4 @@ class AsyncIterator[T](private val source: Iterator[T], bufferSize: Option[Int]
item
}
}
}
}

0 comments on commit 79f06c7

Please sign in to comment.