Amongst other things, a race issue that lead the channel to read nothing when interrupted by another thread instead of throwing is fixed. This was caused by the implementation relying on AbstractInterruptibleChannel::end to detect interruption even if detected by waiting on BlockingQueue::take. This was not reliable as when a thread is interrupted, it first unparks parked threads, then calls the channel's interruption hook. This makes it possible for the interruption to be detected by the queue, but not yet by the channel (AbstractInterruptibleChannel::end). Now the channel throws a ClosedByInterruptionException when an InterruptedException is thrown by BlockingQueue::take.
Another notable change is that an upstream error is logged and not recorded if it is found that there is no way for the reader to notice it due to channel closure.
coverage: 90.447% (-0.03%) from 90.481%
when pulling e7c519b1356bd8fa2051bafad49be4174c92b67d on bcs-touch-ups
into 722231a453772a5e5fca63da83c9bbdf63206577 on master.
Amongst other things, a race issue that lead the channel to read nothing when interrupted by another thread instead of throwing is fixed. This was caused by the implementation relying on AbstractInterruptibleChannel::end to detect interruption even if detected by waiting on BlockingQueue::take. This was not reliable as when a thread is interrupted, it first unparks parked threads, then calls the channel's interruption hook. This makes it possible for the interruption to be detected by the queue, but not yet by the channel (AbstractInterruptibleChannel::end). Now the channel throws a ClosedByInterruptionException when an InterruptedException is thrown by BlockingQueue::take.
Another notable change is that an upstream error is logged and not recorded if it is found that there is no way for the reader to notice it due to channel closure.