RFR: JDK-8314194: Reusing CyclicBarrier, it should be possible to change the barrierCommand

2023-08-29 Thread chenggwang
eg:5 individuals in the first round of written exams,ending with a ranking based on everyone's score points; and a second round of interviews, with a ranking based on the average of the three interviewers' scores;The two rounds of ranking methods are the barrierCommand, and they are different -

Re: RFR: JDK-8314194: Reusing CyclicBarrier, it should be possible to change the barrierCommand

2023-08-29 Thread Dalibor Topic
On Fri, 11 Aug 2023 02:33:05 GMT, chenggwang wrote: > eg:5 individuals in the first round of written exams,ending with a ranking > based on everyone's score points; and a second round of interviews, with a > ranking based on the average of the three interviewers' scores;The two rounds > of ran

Re: RFR: JDK-8314194: Reusing CyclicBarrier, it should be possible to change the barrierCommand

2023-08-29 Thread chenggwang
On Fri, 11 Aug 2023 02:33:05 GMT, chenggwang wrote: > eg:5 individuals in the first round of written exams,ending with a ranking > based on everyone's score points; and a second round of interviews, with a > ranking based on the average of the three interviewers' scores;The two rounds > of ran

Re: RFR: JDK-8314194: Reusing CyclicBarrier, it should be possible to change the barrierCommand

2023-08-30 Thread chenggwang
On Fri, 11 Aug 2023 02:33:05 GMT, chenggwang wrote: > Sorry, my description in Issue JDK-8314194(which I submitted) is ambiguous > and makes you think of Phaser. My intention is that each generation of > CyclicBarrier barrierCommand can change. Let me give you a scenario > For example, the U.S.

Re: RFR: JDK-8314194: Reusing CyclicBarrier, it should be possible to change the barrierCommand

2023-08-30 Thread chenggwang
On Fri, 11 Aug 2023 02:33:05 GMT, chenggwang wrote: > Sorry, my description in Issue JDK-8314194(which I submitted) is ambiguous > and makes you think of Phaser. My intention is that each generation of > CyclicBarrier barrierCommand can change. Let me give you a scenario > For example, the U.S.

Re: RFR: JDK-8314194: Reusing CyclicBarrier, it should be possible to change the barrierCommand

2023-08-30 Thread Alan Bateman
On Wed, 30 Aug 2023 12:02:12 GMT, chenggwang wrote: > Hi Can anyone help me to review this PR @sormuras @asotona or any other > reviewer? I think you first need to make a case for changing the CyclicBarrier API as opposed to dealing with the phases in your BarrierAction or using the Phaser AP

Re: RFR: JDK-8314194: Reusing CyclicBarrier, it should be possible to change the barrierCommand

2023-08-30 Thread chenggwang
On Wed, 30 Aug 2023 13:20:15 GMT, Alan Bateman wrote: > > Hi Can anyone help me to review this PR @sormuras @asotona or any other > > reviewer? > > I think you first need to make a case for changing the CyclicBarrier API as > opposed to dealing with the phases in your BarrierAction or using th

Re: RFR: JDK-8314194: Reusing CyclicBarrier, it should be possible to change the barrierCommand

2023-08-31 Thread David Holmes
On Fri, 11 Aug 2023 02:33:05 GMT, chenggwang wrote: > Sorry, my description in Issue JDK-8314194(which I submitted) is ambiguous > and makes you think of Phaser. My intention is that each generation of > CyclicBarrier barrierCommand can change. Let me give you a scenario > For example, the U.S.

Re: RFR: JDK-8314194: Reusing CyclicBarrier, it should be possible to change the barrierCommand

2023-08-31 Thread Viktor Klang
On Thu, 31 Aug 2023 06:59:29 GMT, David Holmes wrote: >> Sorry, my description in Issue JDK-8314194(which I submitted) is ambiguous >> and makes you think of Phaser. My intention is that each generation of >> CyclicBarrier barrierCommand can change. Let me give you a scenario >> For example, th

Re: RFR: JDK-8314194: Reusing CyclicBarrier, it should be possible to change the barrierCommand

2023-08-31 Thread chenggwang
On Fri, 11 Aug 2023 02:33:05 GMT, chenggwang wrote: > Sorry, my description in Issue JDK-8314194(which I submitted) is ambiguous > and makes you think of Phaser. My intention is that each generation of > CyclicBarrier barrierCommand can change. Let me give you a scenario > For example, the U.S.

Re: RFR: JDK-8314194: Reusing CyclicBarrier, it should be possible to change the barrierCommand

2023-09-11 Thread David Holmes
On Thu, 31 Aug 2023 10:02:45 GMT, chenggwang wrote: >> Sorry, my description in Issue JDK-8314194(which I submitted) is ambiguous >> and makes you think of Phaser. My intention is that each generation of >> CyclicBarrier barrierCommand can change. Let me give you a scenario >> For example, the

Re: RFR: JDK-8314194: Reusing CyclicBarrier, it should be possible to change the barrierCommand

2023-09-12 Thread Martin Buchholz
On Fri, 11 Aug 2023 02:33:05 GMT, chenggwang wrote: > Sorry, my description in Issue JDK-8314194(which I submitted) is ambiguous > and makes you think of Phaser. My intention is that each generation of > CyclicBarrier barrierCommand can change. Let me give you a scenario > For example, the U.S.

Re: RFR: JDK-8314194: Reusing CyclicBarrier, it should be possible to change the barrierCommand

2023-09-15 Thread chenggwang
On Tue, 12 Sep 2023 16:11:56 GMT, Martin Buchholz wrote: > We should try to retain designed immutability in concurrency classes. Having > had the experience of having fixed many bugs with knobs tunable at runtime. > If you make a field mutable, you need to think not just about "set", but also