RFR: JDK-8297605 DelayQueue javadoc is confusing
Martin Buchholz
martin at openjdk.org
Thu Feb 23 18:56:09 UTC 2023
On Thu, 23 Feb 2023 15:36:48 GMT, Viktor Klang <duke at openjdk.org> wrote:
> Clarifies the distinction between expiration of the head of DelayQueue and how it relates to `poll`, `take`, and `peek`. See discussion on https://bugs.openjdk.org/browse/JDK-8297605
>
> @DougLea If possible, please weigh in on whether this is in line with your thoughts on the matter.
src/java.base/share/classes/java/util/concurrent/DelayQueue.java line 54:
> 52: * when its delay has expired. The <em>head</em> of the queue is that
> 53: * {@code Delayed} element whose delay expired furthest in the
> 54: * past. If no delay has expired there is no head and {@code poll}
I like introducing the concept of "expired head".
Aren't we defining "expired head" here, not "head"?
-------------
PR: https://git.openjdk.org/jdk/pull/12729
More information about the core-libs-dev
mailing list