On Tue, 17 Dec 2024 13:45:38 GMT, Robert Toyonaga <d...@openjdk.org> wrote:
>> `MutexLockerImpl` was not intended for external subclassing, but as the >> internal base class for `MutexLocker`, and `ConditionalMutexLocker`. CML >> was provided for exactly this kind of situation: conditionally locking the >> mutex. > > Ok I see. I will stop using `ConditionalMutexLocker` as a base class. > Instead, I'll just get rid of `NmtVirtualMemoryLocker` and use > `ConditionalMutexLocker` directly. Regarding use of `MutexLockerImpl`, perhaps, though I see nothing in the JBS issue or the PR that says that. If it's the name that drives that position then I think it can easily be argued that it's misnamed, and should be something like MutexLockerBase. It *is* nicely designed for use as a base class, with protected ctors/dtor, making it a convient basis for lockers for specific use cases. But see my other response about how to has-a use CML (and MutexLocker) for that purpose. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/22745#discussion_r1890769789