Re: RFR: 8355726: LinkedBlockingDeque fixes and improvements

2025-05-09 Thread Viktor Klang
On Thu, 8 May 2025 13:47:41 GMT, kabutz wrote: >> src/java.base/share/classes/java/util/concurrent/LinkedBlockingDeque.java >> line 341: >> >>> 339: if (count >= capacity) >>> 340: return false; >>> 341: linkFirst(node); >> >> I'm a bit uneasy about incr

Re: RFR: 8355726: LinkedBlockingDeque fixes and improvements

2025-05-09 Thread Viktor Klang
On Thu, 8 May 2025 14:28:18 GMT, kabutz wrote: >> src/java.base/share/classes/java/util/concurrent/LinkedBlockingDeque.java >> line 865: >> >>> 863: long n = 0; >>> 864: for (E e : c) { >>> 865: Objects.requireNonNull(e); >> >> This makes me wonder: Does it make sen

Re: RFR: 8355726: LinkedBlockingDeque fixes and improvements

2025-05-08 Thread kabutz
On Thu, 8 May 2025 08:59:59 GMT, Viktor Klang wrote: >> We logged several bugs on the LinkedBlockingDeque. This aggregates them into >> a single bug report and PR. >> >> 1. LinkedBlockingDeque does not immediately throw InterruptedException in >> put/take >> >> The LinkedBlockingDeque does no

Re: RFR: 8355726: LinkedBlockingDeque fixes and improvements

2025-05-08 Thread kabutz
On Thu, 8 May 2025 08:33:06 GMT, Viktor Klang wrote: > I'm a bit uneasy about incrementing the `count` in `linkFirst` but not > enforcing the invariant. What's the benefit to changing linkFirst and > linkLast to return void instead of keeping the original returning a boolean? I based the appro

Re: RFR: 8355726: LinkedBlockingDeque fixes and improvements

2025-05-08 Thread kabutz
On Thu, 8 May 2025 08:41:52 GMT, Viktor Klang 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 siz

Re: RFR: 8355726: LinkedBlockingDeque fixes and improvements

2025-05-08 Thread Viktor Klang
On Mon, 28 Apr 2025 15:23:18 GMT, kabutz wrote: > We logged several bugs on the LinkedBlockingDeque. This aggregates them into > a single bug report and PR. > > 1. LinkedBlockingDeque does not immediately throw InterruptedException in > put/take > > The LinkedBlockingDeque does not behave con

Re: RFR: 8355726: LinkedBlockingDeque fixes and improvements

2025-05-08 Thread Viktor Klang
On Mon, 28 Apr 2025 15:23:18 GMT, kabutz wrote: > We logged several bugs on the LinkedBlockingDeque. This aggregates them into > a single bug report and PR. > > 1. LinkedBlockingDeque does not immediately throw InterruptedException in > put/take > > The LinkedBlockingDeque does not behave con

Re: RFR: 8355726: LinkedBlockingDeque fixes and improvements

2025-05-08 Thread Viktor Klang
On Mon, 28 Apr 2025 15:23:18 GMT, kabutz wrote: > We logged several bugs on the LinkedBlockingDeque. This aggregates them into > a single bug report and PR. > > 1. LinkedBlockingDeque does not immediately throw InterruptedException in > put/take > > The LinkedBlockingDeque does not behave con

Re: RFR: 8355726: LinkedBlockingDeque fixes and improvements

2025-05-08 Thread Viktor Klang
On Mon, 28 Apr 2025 15:23:18 GMT, kabutz wrote: > We logged several bugs on the LinkedBlockingDeque. This aggregates them into > a single bug report and PR. > > 1. LinkedBlockingDeque does not immediately throw InterruptedException in > put/take > > The LinkedBlockingDeque does not behave con

Re: RFR: 8355726: LinkedBlockingDeque fixes and improvements

2025-05-07 Thread kabutz
On Wed, 7 May 2025 10:43:55 GMT, kabutz wrote: >> @kabutz Thanks for opening this PR—just confirming that it's on my to-review >> queue. > > @viktorklang-ora any idea whom else we can ask to approve this PR? > @kabutz I think @AlanBateman might be able to have a look as well. > > As for timing

Re: RFR: 8355726: LinkedBlockingDeque fixes and improvements

2025-05-07 Thread Viktor Klang
On Wed, 7 May 2025 10:43:55 GMT, kabutz wrote: >> @kabutz Thanks for opening this PR—just confirming that it's on my to-review >> queue. > > @viktorklang-ora any idea whom else we can ask to approve this PR? @kabutz I think @AlanBateman might be able to have a look as well. As for timing, it s

Re: RFR: 8355726: LinkedBlockingDeque fixes and improvements

2025-05-07 Thread kabutz
On Mon, 28 Apr 2025 19:48:40 GMT, Viktor Klang wrote: >> @viktorklang-ora @DougLea @AlanBateman > > @kabutz Thanks for opening this PR—just confirming that it's on my to-review > queue. @viktorklang-ora any idea whom else we can ask to approve this PR? - PR Comment: https://git.op

Re: RFR: 8355726: LinkedBlockingDeque fixes and improvements

2025-05-02 Thread kabutz
On Fri, 2 May 2025 13:19:13 GMT, Doug Lea wrote: >> We logged several bugs on the LinkedBlockingDeque. This aggregates them into >> a single bug report and PR. >> >> 1. LinkedBlockingDeque does not immediately throw InterruptedException in >> put/take >> >> The LinkedBlockingDeque does not be

Re: RFR: 8355726: LinkedBlockingDeque fixes and improvements

2025-05-02 Thread Doug Lea
On Mon, 28 Apr 2025 15:23:18 GMT, kabutz wrote: > We logged several bugs on the LinkedBlockingDeque. This aggregates them into > a single bug report and PR. > > 1. LinkedBlockingDeque does not immediately throw InterruptedException in > put/take > > The LinkedBlockingDeque does not behave con

Re: RFR: 8355726: LinkedBlockingDeque fixes and improvements

2025-04-28 Thread Viktor Klang
On Mon, 28 Apr 2025 15:33:50 GMT, kabutz wrote: >> We logged several bugs on the LinkedBlockingDeque. This aggregates them into >> a single bug report and PR. >> >> 1. LinkedBlockingDeque does not immediately throw InterruptedException in >> put/take >> >> The LinkedBlockingDeque does not beh

Re: RFR: 8355726: LinkedBlockingDeque fixes and improvements

2025-04-28 Thread kabutz
On Mon, 28 Apr 2025 15:23:18 GMT, kabutz wrote: > We logged several bugs on the LinkedBlockingDeque. This aggregates them into > a single bug report and PR. > > 1. LinkedBlockingDeque does not immediately throw InterruptedException in > put/take > > The LinkedBlockingDeque does not behave con

RFR: 8355726: LinkedBlockingDeque fixes and improvements

2025-04-28 Thread kabutz
We logged several bugs on the LinkedBlockingDeque. This aggregates them into a single bug report and PR. 1. LinkedBlockingDeque does not immediately throw InterruptedException in put/take The LinkedBlockingDeque does not behave consistently with other concurrency components. If we call putFirs