RFR: jsr166 jdk integration 2018-02
martinrb at google.com
Fri Feb 9 05:35:55 UTC 2018
On Thu, Feb 8, 2018 at 8:39 PM, David Holmes <david.holmes at oracle.com>
> 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
> This whole notion that "this" can be unreachable whilst a method on it is
> still executing is just broken - it's an unusable programming model. Any
> code that does "new Foo().bar()" could fail unless Foo.bar() has a
> reachability fence in it. :( Sheesh!
I've argued similarly even in the past month that "this" should always
remain reachable while a method on "this" is executing, in the presence of
a finalize method. (It would also be nice if java language scope mapped to
reachability range, but that information is already lost in the translation
to bytecode.) But apparently it is quite a burden on any implementation to
ensure reachability, especially after inlining.
We've never had a report of this problem occurring in practice.
More information about the core-libs-dev