C++ Logo

sg5

Advanced search

Re: Intent of implementation-defined case of thread local dynamic init evaluated by atomic block?

From: Jens Maurer <Jens.Maurer_at_[hidden]>
Date: Fri, 15 Jul 2022 09:36:49 +0200
On 15/07/2022 02.20, Hubert Tong via SG5 wrote:
> In DTS 12907, 8.8 [stmt.tx] paragraph 6, bullet 6.7:
>
> * dynamic initialization of a variable with thread storage duration.
>
> Is this intended to cover the case where the dynamic initialization for a non-local variable of thread storage duration is evaluated within the atomic block because the initialization was deferred ([basic.start.dynamic]) and can be deferred no further?

This is primarily concerned with local variables with thread storage duration,
where we have express synchronization effects.

However, it seems safer to exclude such dynamic initialization in general
(as the wording implies).

Jens

Received on 2022-07-15 07:36:53