RFR: 8355726: LinkedBlockingDeque fixes and improvements

Viktor Klang vklang at openjdk.org
Mon Jun 9 13:13:53 UTC 2025


On Mon, 9 Jun 2025 11:58:03 GMT, kabutz <duke at openjdk.org> wrote:

>> @kabutz I'd think maintaining the invariants within linkFirst and linkLast would be preferable (`count` must be re-read under the lock anyway)
>
> What would you like to do if the invariant fails inside linkFirst() and linkLast()? Should we throw an AssertionError each time?

No, I was more thinking keeping it as it was: (return true/false from linkFirst / linkLast depending on whether it passes the capacity check or not)

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/24925#discussion_r2135696882


More information about the core-libs-dev mailing list