RFR: 8185746: Remove Mutex destructor assertion
Kim Barrett
kim.barrett at oracle.com
Thu Aug 3 17:44:07 UTC 2017
> On Aug 3, 2017, at 1:35 PM, Kim Barrett <kim.barrett at oracle.com> wrote:
> There’s quite a (known) mess in that hierarchy.
Note that some of the bad aspects of the inheritance of Mutex from Monitor could
be fixed by C++11 deleted functions, e.g. in Mutex, instead of
private:
bool notify () { ShouldNotReachHere(); return false; }
with C++11 one could have
public:
bool notify() = delete;
Still not perfect, since one can still cast a Mutex reference to a Monitor reference
and then use notify. (That’s true now too.) Better would be to fix the inheritance
structure. (And just flipping the order isn’t, IMO, the best way to do that, but that’s
a potentially much longer discussion.)
More information about the hotspot-runtime-dev
mailing list