RFR: 8319928: Exceptions thrown by cleanup actions passed to reinterpreted segments should be ignored
Maurizio Cimadamore
mcimadamore at openjdk.org
Mon Nov 13 16:09:12 UTC 2023
On Fri, 10 Nov 2023 16:34:11 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
> This simplePR tweaks the factory which wraps custom cleanup actions passed to `MemorySegment::reinterpret`, so that any exception thrown by the custom cleanup is swallowed when the arena is closed.
>
> This aligns the behavior of confined/shared session with that of implicit session (as implicit sessions are backed by a `Cleaner`, there is no way for cleanup exception to bubble up).
After some offline discussions, I've decided to add a new exception (Arena.CleanupException) which is used to wrap custom cleanup action exceptions and rethrow them on close.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/16619#issuecomment-1808461148
More information about the core-libs-dev
mailing list