RFR: 8355726: LinkedBlockingDeque fixes and improvements
Doug Lea
dl at openjdk.org
Mon Jun 9 10:59:53 UTC 2025
On Mon, 9 Jun 2025 09:24:57 GMT, Viktor Klang <vklang at openjdk.org> wrote:
>>> We could likely check if there's any remaining capacity up front, and immediately return false?
>>
>> We could if you like. I wanted to make as few changes as possible, to not introduce unexpected changes. This particular bug was to stop a size overflow.
>
> @DougLea What do you think about checking if the target collection is likely going to fit into the queue early?
Because of races, prechecks can't be exactly accurate, but I think Heinz's current approach is a good choice, and is similar to how it's done elsewhere.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24925#discussion_r2135512775
More information about the core-libs-dev
mailing list