Movatterモバイル変換


[0]ホーム

URL:


Issue 1784 - WG21 CWG Issues
Title
Concurrent execution during static local initialization
Status
c++17
Section
8.10 [stmt.dcl]
Submitter
Jens Maurer

Created on2013-09-27.00:00:00 last changed96 months ago

Messages

msg6159 (view)
Date: 2016-02-15.00:00:00

Notes from the February, 2016 meeting:

SG1 concluded that wording similar to the following should beadded:

For any actionA such that the declaration is sequenced beforeA, initialization shall happen beforeA. Theconcurrent execution shall block for completion of the initialization.
msg4677 (view)
Date: 2017-02-15.00:00:00

[Adopted at the February/March, 2017 meeting as document P0250R3.]

Regarding initialization of a block-scope static variable,8.10 [stmt.dcl] paragraph 4 says,

If control enters the declaration concurrently while the variable is beinginitialized, the concurrent execution shall wait for completion of theinitialization.

This specification does not use the terminology of6.10.2 [intro.multithread], so the meaning of “wait” is notclear. For example, will a concurrent thread that “waited”see (in the sense of happens-before) the result of the initialization(including side effects caused during the initialization)?

Perhaps the “synchronizes-with” terminology could beused here.

History
DateUserActionArgs
2018-02-27 00:00:00adminsetmessages: +msg6159
2018-02-27 00:00:00adminsetstatus: concurrency -> c++17
2013-09-27 00:00:00admincreate

[8]ページ先頭

©2009-2026 Movatter.jp