RFR: 8282721: HotSpot Style Guide should allow considered use of C++ thread_local

Kim Barrett kbarrett at openjdk.java.net
Mon Mar 7 17:26:09 UTC 2022


On Mon, 7 Mar 2022 06:34:20 GMT, David Holmes <dholmes at openjdk.org> wrote:

> Style guide changes to support JDK-8282469 (PR https://github.com/openjdk/jdk/pull/7719). We no longer prohibit use of C++ `thread_local`, but allow it when there is an essential, and considered, need.
> 
> This is a modification of the Style Guide, so rough consensus among the HotSpot Group members is required to make this change. Only Group members should vote for approval (via the github PR), though reasoned objections or comments from anyone will be considered. A decision on this proposal will not be made before Friday 18-Mar-2022 at 12h00 UTC.
> 
> Since we're piggybacking on github PRs here, please use the PR review process to approve (click on Review Changes > Approve), rather than sending a "vote: yes" email reply that would be normal for a CFV.

Looks good.  Just a trivial formatting comment.

doc/hotspot-style.md line 669:

> 667: problems as for ordinary namespace-scoped variables. So we avoid use of
> 668: `thread_local` in general, limiting its use to only those cases where dynamic
> 669: initialization and destruction are essential. See [JDK-8282469](https://bugs.openjdk.java.net/browse/JDK-8282469)

I'd like a line break between "See" and the bug link, to reduce the line length.

-------------

Marked as reviewed by kbarrett (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/7720


More information about the hotspot-dev mailing list