New candidate JEP: 429: Extent-Local Variables (Incubator)
Zheka Kozlov
orionllmain at gmail.com
Sun Aug 28 16:24:51 UTC 2022
Just out of curiosity: why was a static where() method chosen? An instance
method seems more natural:
PRINCIPAL.where(principal).run(...)
vs.
ExtentLocal.where(PRINCIPAL, principal).run()
Also, a couple of notes regarding Javadoc:
1. Two methods runWithBinding() and callWithBinding() are mentioned in
the description. But ExtentLocal doesn't have such methods. It only has
three overloads of where().
2. The code example doesn't use a code snippet. It uses the old HTML
formatting.
On Fri, Aug 12, 2022 at 6:18 AM <mark.reinhold at oracle.com> wrote:
> https://openjdk.org/jeps/429
>
> Summary: Introduce extent-local variables, which enable the sharing
> of immutable data within and across threads. They are preferred to
> thread-local variables, especially when using large numbers of virtual
> threads. This is an incubating API.
>
> - Mark
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/jdk-dev/attachments/20220828/fed09e6d/attachment.htm>
More information about the jdk-dev
mailing list