taming resource scopes
Radosław Smogura
mail at smogura.eu
Sat May 29 15:07:37 UTC 2021
Hi Maurizio,
Thank you this looks very interesting. I’ll try to integrate it with pooled allocator - I think there should be no issues nor huge performance degradation.
From the other hand, I read the article and a and took a look at the pool request.
I wonder if some, mentioned performance concern related to SharedScope can’t be mitigated. I think the aliveness checks (volatile state check) when calling addCloseDroendency are executed twice - once when calling this method and once with acquire. Just a micro optimization observation.
Kind regards,
Rado
> On May 28, 2021, at 6:35 PM, Maurizio Cimadamore <maurizio.cimadamore at oracle.com> wrote:
>
> Hi,
> we've been looking beyond 17 at things we can do to improve support for resource scopes, especially in the context of native calls. I tried to capture the various things we explored in the writeup below:
>
> https://inside.java/2021/05/28/taming-resource-scopes/
>
> I think overall the takeaway points are pretty good:
>
> * we can simplify the acquire/release scope mechanism with a better, higher-level API
> * we can enhance safety when calling native functions using _any kind_ of resource scopes (with relatively little overhead)
> * we can make it easier to tailor the safety characteristics of CLinker to suit application needs
>
> Cheers
> Maurizio
>
More information about the panama-dev
mailing list