On Mon, 15 Jul 2024 09:11:53 GMT, Maurizio Cimadamore <mcimadam...@openjdk.org> wrote:
> avoiding unnecessary deoptimization (as in this PR) is not going to help much, What would definitively help is to somehow reduce the number of threads to handshake when calling close - e.g. have an arena that is shared but only to a *group* of thread. We can do that easily using structured concurrency. But for unstructured code there's not a lot that can be done, as there's no way for the runtime to guess which threads can access segments created by a given arena. ------------- PR Comment: https://git.openjdk.org/jdk/pull/20158#issuecomment-2228046170