On Wed, 29 Oct 2025 06:11:56 GMT, David Holmes <[email protected]> wrote:
>> Not sure if I like that idea because then we might have to change other >> callers along the way for this new convention and everybody's already >> confused by TRAPS so then they'd be confused by a new TRAPS too. > > I don't think we would have to. There are a handful of methods that now > declare TRAPS but the only exception they should ever encounter is the > PreemptException. It would be easier to understand the code if this was > evident in their use of TRAPS. Also note it is purely documentation - the > definition of `PREEMPTABLE_TRAPS` is exactly the same as `TRAPS` If we want to avoid confusion with other users of `ObjectLocker` maybe we can leave it as it is and subclass it with a preemptable version? https://github.com/pchilano/jdk/compare/JDK-8369238...pchilano:jdk:PreemptableObjectLocker (this version could also use `PREEMPTABLE_TRAPS`) ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/27802#discussion_r2475339482
