RFR: jsr166 jdk integration 2018-02

2018-02-08 Thread Martin Buchholz
http://cr.openjdk.java.net/~martin/webrevs/jdk/jsr166-integration/overview.html 8190324: ThreadPoolExecutor should not specify a dependency on finalization http://cr.openjdk.java.net/~martin/webrevs/jdk/jsr166-integration/ThreadPoolExecutor-finalize/index.html https://bugs.openjdk.java.net/browse/

Re: RFR: jsr166 jdk integration 2018-02

2018-02-08 Thread David Holmes
On 9/02/2018 11:19 AM, Martin Buchholz wrote: http://cr.openjdk.java.net/~martin/webrevs/jdk/jsr166-integration/overview.html 8190324: ThreadPoolExecutor should not specify a dependency on finalization http://cr.openjdk.java.net/~martin/webrevs/jdk/jsr166-integration/ThreadPoolExecutor-finalize/

Re: RFR: jsr166 jdk integration 2018-02

2018-02-08 Thread Martin Buchholz
On Thu, Feb 8, 2018 at 7:39 PM, David Holmes wrote: > On 9/02/2018 11:19 AM, Martin Buchholz wrote: > >> http://cr.openjdk.java.net/~martin/webrevs/jdk/jsr166-integr >> ation/overview.html >> >> 8190324: ThreadPoolExecutor should not specify a dependency on >> finalization >> http://cr.openjdk.ja

Re: RFR: jsr166 jdk integration 2018-02

2018-02-08 Thread David Holmes
Hi Martin, On 9/02/2018 2:07 PM, Martin Buchholz wrote: On Thu, Feb 8, 2018 at 7:39 PM, David Holmes > wrote: On 9/02/2018 11:19 AM, Martin Buchholz wrote: http://cr.openjdk.java.net/~martin/webrevs/jdk/jsr166-integration/overview.html <

Re: RFR: jsr166 jdk integration 2018-02

2018-02-08 Thread Martin Buchholz
On Thu, Feb 8, 2018 at 8:39 PM, David Holmes wrote: > > Wow! DelegatedExecutorService doesn't even have a finalize() method that > does a shutdown. So we have to put the reachabilityFence in it to prevent > the delegatee from becoming unreachable due to the delegator becoming > unreachable! > > T

Re: RFR: jsr166 jdk integration 2018-02

2018-02-08 Thread David Holmes
On 9/02/2018 3:35 PM, Martin Buchholz wrote: On Thu, Feb 8, 2018 at 8:39 PM, David Holmes > wrote: Wow! DelegatedExecutorService doesn't even have a finalize() method that does a shutdown. So we have to put the reachabilityFence in it to prevent the del

Re: RFR: jsr166 jdk integration 2018-02

2018-02-08 Thread Martin Buchholz
On Thu, Feb 8, 2018 at 10:39 PM, David Holmes wrote: > > Well at least it's only an issue if there does exist a finalize() method > that could interfere with the executing method. I have to assume that > somehow the VM is clever enough that if 'this' is in a register and we will > later access a

Re: RFR: jsr166 jdk integration 2018-02

2018-02-09 Thread Paul Sandoz
+1 Hans is right that reachabilityFence can be clumsy but it’s the best we have right now. Paul. > On Feb 8, 2018, at 5:19 PM, Martin Buchholz wrote: > > http://cr.openjdk.java.net/~martin/webrevs/jdk/jsr166-integration/overview.html > >

Re: RFR: jsr166 jdk integration 2018-02

2018-02-10 Thread Martin Buchholz
Hans, thanks for another great lesson! On Fri, Feb 9, 2018 at 11:19 AM, Hans Boehm wrote: > > The downside of treating "this" specially is that it makes it even harder > to explain the other cases, e.g. when the object being finalized > prematurely was an explicit parameter, or perhaps even the