Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

Due to lack of disk space, this fortune database has been discontinued.


devel / comp.lang.c++ / Re: Thread-safe initialization of static objects

SubjectAuthor
* Thread-safe initialization of static objectsBonita Montero
+* Re: Thread-safe initialization of static objectsPavel
|+* Re: Thread-safe initialization of static objectsBonita Montero
||+* Re: Thread-safe initialization of static objectsPavel
|||`* Re: Thread-safe initialization of static objectsBonita Montero
||| `* Re: Thread-safe initialization of static objectsPavel
|||  `* Re: Thread-safe initialization of static objectsBonita Montero
|||   +* Re: Thread-safe initialization of static objectsScott Lurndal
|||   |+* Re: Thread-safe initialization of static objectsRichard Damon
|||   ||`* Re: Thread-safe initialization of static objectsChris M. Thomasson
|||   || `* Re: Thread-safe initialization of static objectsRichard Damon
|||   ||  `* Re: Thread-safe initialization of static objectsChris M. Thomasson
|||   ||   +* Re: Thread-safe initialization of static objectsRichard Damon
|||   ||   |`- Re: Thread-safe initialization of static objectsChris M. Thomasson
|||   ||   `* Re: Thread-safe initialization of static objectsScott Lurndal
|||   ||    `- Re: Thread-safe initialization of static objectsChris M. Thomasson
|||   |`- Re: Thread-safe initialization of static objectsBonita Montero
|||   +* Re: Thread-safe initialization of static objectsPavel
|||   |`* Re: Thread-safe initialization of static objectsBonita Montero
|||   | +* Re: Thread-safe initialization of static objectsPavel
|||   | |`* Re: Thread-safe initialization of static objectsBonita Montero
|||   | | +* Re: Thread-safe initialization of static objectsPaavo Helde
|||   | | |`* Re: Thread-safe initialization of static objectsBonita Montero
|||   | | | +* Re: Thread-safe initialization of static objectsPavel
|||   | | | |`* Re: Thread-safe initialization of static objectsBonita Montero
|||   | | | | +* Re: Thread-safe initialization of static objectsRichard Damon
|||   | | | | |`* Re: Thread-safe initialization of static objectsBonita Montero
|||   | | | | | +* Re: Thread-safe initialization of static objectsRichard Damon
|||   | | | | | |+* Re: Thread-safe initialization of static objectsBonita Montero
|||   | | | | | ||+* Re: Thread-safe initialization of static objectsPaavo Helde
|||   | | | | | |||+* Re: Thread-safe initialization of static objectsBonita Montero
|||   | | | | | ||||+- Re: Thread-safe initialization of static objectsChris M. Thomasson
|||   | | | | | ||||`* Re: Thread-safe initialization of static objectsPaavo Helde
|||   | | | | | |||| +* Re: Thread-safe initialization of static objectsBonita Montero
|||   | | | | | |||| |+- Re: Thread-safe initialization of static objectsRichard Damon
|||   | | | | | |||| |`- Re: Thread-safe initialization of static objectsChris M. Thomasson
|||   | | | | | |||| `* Re: Thread-safe initialization of static objectsBonita Montero
|||   | | | | | ||||  `* Re: Thread-safe initialization of static objectsBonita Montero
|||   | | | | | ||||   `* Re: Thread-safe initialization of static objectsPaavo Helde
|||   | | | | | ||||    +- Re: Thread-safe initialization of static objectsBonita Montero
|||   | | | | | ||||    `- Re: Thread-safe initialization of static objectsBonita Montero
|||   | | | | | |||`* Re: Thread-safe initialization of static objectsMichael S
|||   | | | | | ||| +- Re: Thread-safe initialization of static objectsScott Lurndal
|||   | | | | | ||| `- Re: Thread-safe initialization of static objectsChris M. Thomasson
|||   | | | | | ||`* Re: Thread-safe initialization of static objectsRichard Damon
|||   | | | | | || `- Re: Thread-safe initialization of static objectsChris M. Thomasson
|||   | | | | | |`* Re: Thread-safe initialization of static objectsPavel
|||   | | | | | | `* Re: Thread-safe initialization of static objectsChris M. Thomasson
|||   | | | | | |  `* Re: Thread-safe initialization of static objectsPavel
|||   | | | | | |   `* Re: Thread-safe initialization of static objectsChris M. Thomasson
|||   | | | | | |    `- Re: Thread-safe initialization of static objectsPavel
|||   | | | | | `- Re: Thread-safe initialization of static objectsChris M. Thomasson
|||   | | | | `- Re: Thread-safe initialization of static objectsPavel
|||   | | | `* Re: Thread-safe initialization of static objectsChris M. Thomasson
|||   | | |  `* Re: Thread-safe initialization of static objectsBonita Montero
|||   | | |   +* Re: Thread-safe initialization of static objectsChris M. Thomasson
|||   | | |   |`* Re: Thread-safe initialization of static objectsBonita Montero
|||   | | |   | `* Re: Thread-safe initialization of static objectsChris M. Thomasson
|||   | | |   |  +- Re: Thread-safe initialization of static objectsChris M. Thomasson
|||   | | |   |  `* Re: Thread-safe initialization of static objectsBonita Montero
|||   | | |   |   +- Re: Thread-safe initialization of static objectsChris M. Thomasson
|||   | | |   |   `- Re: Thread-safe initialization of static objectsChris M. Thomasson
|||   | | |   +- Re: Thread-safe initialization of static objectsChris M. Thomasson
|||   | | |   `* Re: Thread-safe initialization of static objectsRichard Damon
|||   | | |    `* Re: Thread-safe initialization of static objectsBonita Montero
|||   | | |     +- Re: Thread-safe initialization of static objectsChris M. Thomasson
|||   | | |     `* Re: Thread-safe initialization of static objectsChris M. Thomasson
|||   | | |      `* Re: Thread-safe initialization of static objectsBonita Montero
|||   | | |       `* Re: Thread-safe initialization of static objectsChris M. Thomasson
|||   | | |        `* Re: Thread-safe initialization of static objectsBonita Montero
|||   | | |         `* Re: Thread-safe initialization of static objectsChris M. Thomasson
|||   | | |          `* Re: Thread-safe initialization of static objectsBonita Montero
|||   | | |           `* Re: Thread-safe initialization of static objectsChris M. Thomasson
|||   | | |            `* Re: Thread-safe initialization of static objectsBonita Montero
|||   | | |             `* Re: Thread-safe initialization of static objectsChris M. Thomasson
|||   | | |              +- Re: Thread-safe initialization of static objectsChris M. Thomasson
|||   | | |              `* Re: Thread-safe initialization of static objectsBonita Montero
|||   | | |               `* Re: Thread-safe initialization of static objectsChris M. Thomasson
|||   | | |                `* Re: Thread-safe initialization of static objectsBonita Montero
|||   | | |                 `* Re: Thread-safe initialization of static objectsScott Lurndal
|||   | | |                  +- Re: Thread-safe initialization of static objectsBonita Montero
|||   | | |                  `* Re: Thread-safe initialization of static objectsChris M. Thomasson
|||   | | |                   `* Re: Thread-safe initialization of static objectsBonita Montero
|||   | | |                    `* Re: Thread-safe initialization of static objectsRichard Damon
|||   | | |                     `* Re: Thread-safe initialization of static objectsBonita Montero
|||   | | |                      `* Re: Thread-safe initialization of static objectsPavel
|||   | | |                       `* Re: Thread-safe initialization of static objectsBonita Montero
|||   | | |                        +* Re: Thread-safe initialization of static objectsChris M. Thomasson
|||   | | |                        |`* Re: Thread-safe initialization of static objectsBonita Montero
|||   | | |                        | `* Re: Thread-safe initialization of static objectsChris M. Thomasson
|||   | | |                        |  `* Re: Thread-safe initialization of static objectsBonita Montero
|||   | | |                        |   +* Re: Thread-safe initialization of static objectsChris M. Thomasson
|||   | | |                        |   |`* Re: Thread-safe initialization of static objectsBonita Montero
|||   | | |                        |   | +* Re: Thread-safe initialization of static objectsChris M. Thomasson
|||   | | |                        |   | |`* Re: Thread-safe initialization of static objectsBonita Montero
|||   | | |                        |   | | `* Re: Thread-safe initialization of static objectsChris M. Thomasson
|||   | | |                        |   | |  `* Re: Thread-safe initialization of static objectsBonita Montero
|||   | | |                        |   | |   `* Re: Thread-safe initialization of static objectsChris M. Thomasson
|||   | | |                        |   | |    `* Re: Thread-safe initialization of static objectsBonita Montero
|||   | | |                        |   | |     `* Re: Thread-safe initialization of static objectsChris M. Thomasson
|||   | | |                        |   | |      `* Re: Thread-safe initialization of static objectsBonita Montero
|||   | | |                        |   | `- Re: Thread-safe initialization of static objectsChris M. Thomasson
|||   | | |                        |   `* Re: Thread-safe initialization of static objectsKaz Kylheku
|||   | | |                        `* Re: Thread-safe initialization of static objectsPavel
|||   | | `- Re: Thread-safe initialization of static objectsChris M. Thomasson
|||   | `- Re: Thread-safe initialization of static objectsChris M. Thomasson
|||   `- Re: Thread-safe initialization of static objectsMarcel Mueller
||`- Re: Thread-safe initialization of static objectsChris M. Thomasson
|`* Re: Thread-safe initialization of static objectsChris M. Thomasson
+* Re: Thread-safe initialization of static objectsPaavo Helde
+* Re: Thread-safe initialization of static objectsChris M. Thomasson
+* Re: Thread-safe initialization of static objectsChris M. Thomasson
`* Re: Thread-safe initialization of static objectsFrederick Virchanza Gotham

Pages:123456789101112131415161718192021222324252627
Re: Thread-safe initialization of static objects

<ufg520$3cpai$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2057&group=comp.lang.c%2B%2B#2057

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: chris.m.thomasson.1@gmail.com (Chris M. Thomasson)
Newsgroups: comp.lang.c++
Subject: Re: Thread-safe initialization of static objects
Date: Mon, 2 Oct 2023 21:24:31 -0700
Organization: A noiseless patient Spider
Lines: 32
Message-ID: <ufg520$3cpai$1@dont-email.me>
References: <udafjf$2joeq$1@dont-email.me> <MTUPM.158223$Hih7.125749@fx11.iad>
<uep6pj$1b36d$1@dont-email.me> <byVPM.165856$Hih7.109980@fx11.iad>
<uep8vu$1bect$1@dont-email.me> <PKZPM.232647$ZXz4.71820@fx18.iad>
<ueqfkl$1i6un$2@dont-email.me> <Fa5QM.124660$1B%c.102962@fx09.iad>
<uerem0$1qg8s$1@dont-email.me> <ZYdQM.67167$3vM.17655@fx37.iad>
<uerv9b$1tqis$1@dont-email.me> <LJoQM.19137$EIy4.5875@fx48.iad>
<uetn46$2bkun$1@dont-email.me> <3bzQM.36476$q0k.14387@fx34.iad>
<ueuj9u$2gdqk$3@dont-email.me> <eJCQM.35600$ugs.8334@fx36.iad>
<ueutjo$2ii89$2@dont-email.me> <S%pRM.268878$2ph4.195852@fx14.iad>
<uf6ecm$8rfg$1@dont-email.me> <n0NRM.30341$NkG.4566@fx41.iad>
<uf8dve$nt9u$1@dont-email.me> <ssZRM.206761$1B%c.192431@fx09.iad>
<ufaudd$1dfn9$1@dont-email.me> <l8nSM.46550$TwR4.32061@fx46.iad>
<ufdeog$2p2pl$1@dont-email.me> <LXKSM.296263$GHI6.117665@fx17.iad>
<uffuts$3bpf5$1@dont-email.me> <aVLSM.230967$Hih7.113801@fx11.iad>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 3 Oct 2023 04:24:32 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="cd2ff4e14c40a5b02e43003ab9e86230";
logging-data="3564882"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18f8yp08POg5LchlZXq8hyKMZnbM2ymxqM="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.15.1
Cancel-Lock: sha1:SFJAWWTiZto5eDrLUja4CmQOlhc=
In-Reply-To: <aVLSM.230967$Hih7.113801@fx11.iad>
Content-Language: en-US
 by: Chris M. Thomasson - Tue, 3 Oct 2023 04:24 UTC

On 10/2/2023 8:30 PM, Pavel wrote:
> Chris M. Thomasson wrote:
>> On 10/2/2023 7:24 PM, Pavel wrote:
>>> Bonita Montero wrote:
>>>> Am 02.10.2023 um 01:19 schrieb Pavel:
>>>>
>>>>> Nope. The standard never says this specifically about mutex::lock. ...
>>>>
>>>> Of course, mutex::lock() may throw a system_error.
>>>>
>>> The standard does not say that; but, even if it did, it wouldn't
>>> follow it needed to permit C++ static initialization throw system_error.
>>

[... snip std ...]
> In other words, lock is allowed to throw *if the underlying OS or API
> creates some error condition* -- which a simple POSIX mutex or
> pthread_once doesn't -- or "the function's" error condition is defined.
> And those error conditions are defined in requirements for lock for
> specific mutex types (but Bonita is a writer, she does not need to
> read). And for std::mutex:
[... snip std ...]

Well, shit. It almost has to be Bonita misreading and/or not reading the
std. My first thoughts was that she got all of her limited info from:

https://cplusplus.com/reference/mutex/mutex/lock

and just made up some rules on the fly, and sticks with them... Even
though she knows they are not correct. Humm...

Re: Thread-safe initialization of static objects

<ufglf0$3fj7q$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2058&group=comp.lang.c%2B%2B#2058

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!news.niel.me!news.gegeweb.eu!gegeweb.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Bonita.Montero@gmail.com (Bonita Montero)
Newsgroups: comp.lang.c++
Subject: Re: Thread-safe initialization of static objects
Date: Tue, 3 Oct 2023 11:04:35 +0200
Organization: A noiseless patient Spider
Lines: 13
Message-ID: <ufglf0$3fj7q$1@dont-email.me>
References: <udafjf$2joeq$1@dont-email.me>
<971828e2-0fba-4973-a6df-ee5d716fa9e6n@googlegroups.com>
<ufeb2e$2u9vm$1@dont-email.me> <l%KSM.296264$GHI6.130562@fx17.iad>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 3 Oct 2023 09:04:32 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="485eca7af7972ec2e41e655d59aee6d8";
logging-data="3656954"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX189PpxlQ0L3yWpXcIa/MCYtE6Koi3dqT+U="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:/X05IiJgPgtRwfGI6DSyLiI51sE=
Content-Language: de-DE
In-Reply-To: <l%KSM.296264$GHI6.130562@fx17.iad>
 by: Bonita Montero - Tue, 3 Oct 2023 09:04 UTC

Am 03.10.2023 um 04:28 schrieb Pavel:

> What is a "non-trivial" type and where did you find it initialized in
> the code by Frederick?

A trivial type is a type that can be trivially construted and trivially
copied. His vector<int> isn't trivial in that sense.
His global vector<int> doesn't need to be thread-safe initialized since
it is global and it is initialized before main() or before the shared
object initialitation routine returns. But if it would be static local
the same he did manually with call_conce would be done by the compiler
and the runtime; so that's effort for nothing.

Re: Thread-safe initialization of static objects

<ufim5q$s1$2@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2065&group=comp.lang.c%2B%2B#2065

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: jameskuyper@alumni.caltech.edu (James Kuyper)
Newsgroups: comp.lang.c++
Subject: Re: Thread-safe initialization of static objects
Date: Tue, 3 Oct 2023 23:28:58 -0400
Organization: A noiseless patient Spider
Lines: 19
Message-ID: <ufim5q$s1$2@dont-email.me>
References: <udafjf$2joeq$1@dont-email.me>
<971828e2-0fba-4973-a6df-ee5d716fa9e6n@googlegroups.com>
<ufeb2e$2u9vm$1@dont-email.me> <l%KSM.296264$GHI6.130562@fx17.iad>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 4 Oct 2023 03:28:58 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="4964839f88640b496d9837a0f375a145";
logging-data="897"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/jHslp40euOB6f75vhcGWtoHrE0c2PH2M="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.15.1
Cancel-Lock: sha1:Fu+oHh7XYBqh9tEBJrNGlo3v0kM=
In-Reply-To: <l%KSM.296264$GHI6.130562@fx17.iad>
Content-Language: en-US
 by: James Kuyper - Wed, 4 Oct 2023 03:28 UTC

On 10/2/23 22:28, Pavel wrote:
> Bonita Montero wrote:
....
>> static initialization of non-trivial types is usually done
>> with DCL - no need to instantiate the object yourself.
>>
> What is a "non-trivial" type and where did you find it initialized in
> the code by Frederick?

"Scalar types, trivial class types (11.2), arrays of such types and
cv-qualified versions of these types are collectively called trivial
types." (6.8p9). The term "trivial types" is italicized, an ISO
convention indicating that this sentence constitutes the official
definition of that term. A non-trivial type is any type that doesn't
qualify as a trivial type.

An easy way to test whether a type is trivial is to look at
std::is_trivial<T> (20.15.4.3p4).

Re: Thread-safe initialization of static objects

<ufimnv$3g6$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2066&group=comp.lang.c%2B%2B#2066

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: chris.m.thomasson.1@gmail.com (Chris M. Thomasson)
Newsgroups: comp.lang.c++
Subject: Re: Thread-safe initialization of static objects
Date: Tue, 3 Oct 2023 20:38:38 -0700
Organization: A noiseless patient Spider
Lines: 24
Message-ID: <ufimnv$3g6$1@dont-email.me>
References: <udafjf$2joeq$1@dont-email.me>
<971828e2-0fba-4973-a6df-ee5d716fa9e6n@googlegroups.com>
<ufeb2e$2u9vm$1@dont-email.me> <l%KSM.296264$GHI6.130562@fx17.iad>
<ufim5q$s1$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 4 Oct 2023 03:38:39 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="996f45f5829faa796bb695d84a0a0fe9";
logging-data="3590"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18oRV3C3XTJEm05F9jZoCAiV2GkenXd2T8="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.15.1
Cancel-Lock: sha1:+EerjlMxnGG/ZQYEhT8Osg9Ts0Y=
In-Reply-To: <ufim5q$s1$2@dont-email.me>
Content-Language: en-US
 by: Chris M. Thomasson - Wed, 4 Oct 2023 03:38 UTC

On 10/3/2023 8:28 PM, James Kuyper wrote:
> On 10/2/23 22:28, Pavel wrote:
>> Bonita Montero wrote:
> ...
>>> static initialization of non-trivial types is usually done
>>> with DCL - no need to instantiate the object yourself.
>>>
>> What is a "non-trivial" type and where did you find it initialized in
>> the code by Frederick?
>
> "Scalar types, trivial class types (11.2), arrays of such types and
> cv-qualified versions of these types are collectively called trivial
> types." (6.8p9). The term "trivial types" is italicized, an ISO
> convention indicating that this sentence constitutes the official
> definition of that term. A non-trivial type is any type that doesn't
> qualify as a trivial type.
>
> An easy way to test whether a type is trivial is to look at
> std::is_trivial<T> (20.15.4.3p4).
>

poor old std::is_pod<T>

;^)

Re: Thread-safe initialization of static objects

<ufk2er$ci2o$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2067&group=comp.lang.c%2B%2B#2067

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Bonita.Montero@gmail.com (Bonita Montero)
Newsgroups: comp.lang.c++
Subject: Re: Thread-safe initialization of static objects
Date: Wed, 4 Oct 2023 18:04:47 +0200
Organization: A noiseless patient Spider
Lines: 8
Message-ID: <ufk2er$ci2o$1@dont-email.me>
References: <udafjf$2joeq$1@dont-email.me>
<971828e2-0fba-4973-a6df-ee5d716fa9e6n@googlegroups.com>
<ufeb2e$2u9vm$1@dont-email.me> <l%KSM.296264$GHI6.130562@fx17.iad>
<ufim5q$s1$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 4 Oct 2023 16:04:43 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="5dbe43e98016f6c0690e74a26e3d166d";
logging-data="411736"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX187wR2hfkg0UR3tqdeNA8hAAXbvFG96mTU="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:xxMsuXjP3Ddic/Qhp1sf+Up+kWA=
In-Reply-To: <ufim5q$s1$2@dont-email.me>
Content-Language: de-DE
 by: Bonita Montero - Wed, 4 Oct 2023 16:04 UTC

Am 04.10.2023 um 05:28 schrieb James Kuyper:

> An easy way to test whether a type is trivial is to look at
> std::is_trivial<T> (20.15.4.3p4).

Or look at the runtime for the checks if_trivial depends on.

Re: Thread-safe initialization of static objects

<yPoTM.14960$sxoa.11892@fx13.iad>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2072&group=comp.lang.c%2B%2B#2072

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!newsfeed.hasname.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx13.iad.POSTED!not-for-mail
Subject: Re: Thread-safe initialization of static objects
Newsgroups: comp.lang.c++
References: <udafjf$2joeq$1@dont-email.me> <MTUPM.158223$Hih7.125749@fx11.iad>
<uep6pj$1b36d$1@dont-email.me> <byVPM.165856$Hih7.109980@fx11.iad>
<uep8vu$1bect$1@dont-email.me> <PKZPM.232647$ZXz4.71820@fx18.iad>
<ueqfkl$1i6un$2@dont-email.me> <Fa5QM.124660$1B%c.102962@fx09.iad>
<uerem0$1qg8s$1@dont-email.me> <ZYdQM.67167$3vM.17655@fx37.iad>
<uerv9b$1tqis$1@dont-email.me> <LJoQM.19137$EIy4.5875@fx48.iad>
<uetn46$2bkun$1@dont-email.me> <3bzQM.36476$q0k.14387@fx34.iad>
<ueuj9u$2gdqk$3@dont-email.me> <eJCQM.35600$ugs.8334@fx36.iad>
<ueutjo$2ii89$2@dont-email.me> <S%pRM.268878$2ph4.195852@fx14.iad>
<uf6ecm$8rfg$1@dont-email.me> <n0NRM.30341$NkG.4566@fx41.iad>
<uf8dve$nt9u$1@dont-email.me> <ssZRM.206761$1B%c.192431@fx09.iad>
<ufaudd$1dfn9$1@dont-email.me> <l8nSM.46550$TwR4.32061@fx46.iad>
<ufdeog$2p2pl$1@dont-email.me> <LXKSM.296263$GHI6.117665@fx17.iad>
<ufg4nn$3cpgp$1@dont-email.me>
From: pauldontspamtolk@removeyourself.dontspam.yahoo (Pavel)
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
Firefox/91.0 SeaMonkey/2.53.17.1
MIME-Version: 1.0
In-Reply-To: <ufg4nn$3cpgp$1@dont-email.me>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 17
Message-ID: <yPoTM.14960$sxoa.11892@fx13.iad>
X-Complaints-To: https://www.astraweb.com/aup
NNTP-Posting-Date: Thu, 05 Oct 2023 02:03:10 UTC
Date: Wed, 4 Oct 2023 22:03:10 -0400
X-Received-Bytes: 2108
 by: Pavel - Thu, 5 Oct 2023 02:03 UTC

Bonita Montero wrote:
> Am 03.10.2023 um 04:24 schrieb Pavel:
>> Bonita Montero wrote:
>>> Am 02.10.2023 um 01:19 schrieb Pavel:
>>>
>>>> Nope. The standard never says this specifically about mutex::lock. ...
>>>
>>> Of course, mutex::lock() may throw a system_error.
>
>> The standard does not say that; ...
>
> https://en.cppreference.com/w/cpp/thread/mutex/lock
> "Throws std::system_error when errors occur"
>
>
ccpreference.com is not the standard. Where it disagrees with the
standard, the standard prevails.

Re: Thread-safe initialization of static objects

<ufl7mr$oaud$4@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2073&group=comp.lang.c%2B%2B#2073

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Bonita.Montero@gmail.com (Bonita Montero)
Newsgroups: comp.lang.c++
Subject: Re: Thread-safe initialization of static objects
Date: Thu, 5 Oct 2023 04:40:31 +0200
Organization: A noiseless patient Spider
Lines: 21
Message-ID: <ufl7mr$oaud$4@dont-email.me>
References: <udafjf$2joeq$1@dont-email.me> <MTUPM.158223$Hih7.125749@fx11.iad>
<uep6pj$1b36d$1@dont-email.me> <byVPM.165856$Hih7.109980@fx11.iad>
<uep8vu$1bect$1@dont-email.me> <PKZPM.232647$ZXz4.71820@fx18.iad>
<ueqfkl$1i6un$2@dont-email.me> <Fa5QM.124660$1B%c.102962@fx09.iad>
<uerem0$1qg8s$1@dont-email.me> <ZYdQM.67167$3vM.17655@fx37.iad>
<uerv9b$1tqis$1@dont-email.me> <LJoQM.19137$EIy4.5875@fx48.iad>
<uetn46$2bkun$1@dont-email.me> <3bzQM.36476$q0k.14387@fx34.iad>
<ueuj9u$2gdqk$3@dont-email.me> <eJCQM.35600$ugs.8334@fx36.iad>
<ueutjo$2ii89$2@dont-email.me> <S%pRM.268878$2ph4.195852@fx14.iad>
<uf6ecm$8rfg$1@dont-email.me> <n0NRM.30341$NkG.4566@fx41.iad>
<uf8dve$nt9u$1@dont-email.me> <ssZRM.206761$1B%c.192431@fx09.iad>
<ufaudd$1dfn9$1@dont-email.me> <l8nSM.46550$TwR4.32061@fx46.iad>
<ufdeog$2p2pl$1@dont-email.me> <LXKSM.296263$GHI6.117665@fx17.iad>
<ufg4nn$3cpgp$1@dont-email.me> <yPoTM.14960$sxoa.11892@fx13.iad>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 5 Oct 2023 02:40:27 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="46799ec5c5c68a5220fc78d2a6df9da9";
logging-data="797645"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+aq9SOB/k/o1w2mgFWwI1TcGGrSQQrozE="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:pGJJt7JJqVBuuwTzALu6w2rUnPo=
In-Reply-To: <yPoTM.14960$sxoa.11892@fx13.iad>
Content-Language: de-DE
 by: Bonita Montero - Thu, 5 Oct 2023 02:40 UTC

Am 05.10.2023 um 04:03 schrieb Pavel:
> Bonita Montero wrote:
>> Am 03.10.2023 um 04:24 schrieb Pavel:
>>> Bonita Montero wrote:
>>>> Am 02.10.2023 um 01:19 schrieb Pavel:
>>>>
>>>>> Nope. The standard never says this specifically about mutex::lock. ...
>>>>
>>>> Of course, mutex::lock() may throw a system_error.
>>
>>> The standard does not say that; ...
>>
>> https://en.cppreference.com/w/cpp/thread/mutex/lock
>> "Throws std::system_error when errors occur"
>>
>>
> ccpreference.com is not the standard. Where it disagrees with the
> standard, the standard prevails.

Idiot

Re: Thread-safe initialization of static objects

<fwxTM.15007$xTV9.7324@fx39.iad>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2078&group=comp.lang.c%2B%2B#2078

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx39.iad.POSTED!not-for-mail
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: Thread-safe initialization of static objects
Content-Language: en-US
Newsgroups: comp.lang.c++
References: <udafjf$2joeq$1@dont-email.me> <MTUPM.158223$Hih7.125749@fx11.iad>
<uep6pj$1b36d$1@dont-email.me> <byVPM.165856$Hih7.109980@fx11.iad>
<uep8vu$1bect$1@dont-email.me> <PKZPM.232647$ZXz4.71820@fx18.iad>
<ueqfkl$1i6un$2@dont-email.me> <Fa5QM.124660$1B%c.102962@fx09.iad>
<uerem0$1qg8s$1@dont-email.me> <ZYdQM.67167$3vM.17655@fx37.iad>
<uerv9b$1tqis$1@dont-email.me> <LJoQM.19137$EIy4.5875@fx48.iad>
<uetn46$2bkun$1@dont-email.me> <3bzQM.36476$q0k.14387@fx34.iad>
<ueuj9u$2gdqk$3@dont-email.me> <eJCQM.35600$ugs.8334@fx36.iad>
<ueutjo$2ii89$2@dont-email.me> <S%pRM.268878$2ph4.195852@fx14.iad>
<uf6ecm$8rfg$1@dont-email.me> <n0NRM.30341$NkG.4566@fx41.iad>
<uf8dve$nt9u$1@dont-email.me> <ssZRM.206761$1B%c.192431@fx09.iad>
<ufaudd$1dfn9$1@dont-email.me> <l8nSM.46550$TwR4.32061@fx46.iad>
<ufdeog$2p2pl$1@dont-email.me> <LXKSM.296263$GHI6.117665@fx17.iad>
<ufg4nn$3cpgp$1@dont-email.me> <yPoTM.14960$sxoa.11892@fx13.iad>
<ufl7mr$oaud$4@dont-email.me>
From: Richard@Damon-Family.org (Richard Damon)
In-Reply-To: <ufl7mr$oaud$4@dont-email.me>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 28
Message-ID: <fwxTM.15007$xTV9.7324@fx39.iad>
X-Complaints-To: abuse@easynews.com
Organization: Forte - www.forteinc.com
X-Complaints-Info: Please be sure to forward a copy of ALL headers otherwise we will be unable to process your complaint properly.
Date: Thu, 5 Oct 2023 07:56:59 -0400
X-Received-Bytes: 2455
 by: Richard Damon - Thu, 5 Oct 2023 11:56 UTC

On 10/4/23 10:40 PM, Bonita Montero wrote:
> Am 05.10.2023 um 04:03 schrieb Pavel:
>> Bonita Montero wrote:
>>> Am 03.10.2023 um 04:24 schrieb Pavel:
>>>> Bonita Montero wrote:
>>>>> Am 02.10.2023 um 01:19 schrieb Pavel:
>>>>>
>>>>>> Nope. The standard never says this specifically about mutex::lock.
>>>>>> ...
>>>>>
>>>>> Of course, mutex::lock() may throw a system_error.
>>>
>>>> The standard does not say that; ...
>>>
>>> https://en.cppreference.com/w/cpp/thread/mutex/lock
>>> "Throws std::system_error when errors occur"
>>>
>>>
>> ccpreference.com is not the standard. Where it disagrees with the
>> standard, the standard prevails.
>
> Idiot
>

Yes you are. And you just admitted you don't understand what a
"Standard" is.

Re: Thread-safe initialization of static objects

<ufn27q$13ccq$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2080&group=comp.lang.c%2B%2B#2080

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: chris.m.thomasson.1@gmail.com (Chris M. Thomasson)
Newsgroups: comp.lang.c++
Subject: Re: Thread-safe initialization of static objects
Date: Thu, 5 Oct 2023 12:19:22 -0700
Organization: A noiseless patient Spider
Lines: 31
Message-ID: <ufn27q$13ccq$1@dont-email.me>
References: <udafjf$2joeq$1@dont-email.me> <MTUPM.158223$Hih7.125749@fx11.iad>
<uep6pj$1b36d$1@dont-email.me> <byVPM.165856$Hih7.109980@fx11.iad>
<uep8vu$1bect$1@dont-email.me> <PKZPM.232647$ZXz4.71820@fx18.iad>
<ueqfkl$1i6un$2@dont-email.me> <Fa5QM.124660$1B%c.102962@fx09.iad>
<uerem0$1qg8s$1@dont-email.me> <ZYdQM.67167$3vM.17655@fx37.iad>
<uerv9b$1tqis$1@dont-email.me> <LJoQM.19137$EIy4.5875@fx48.iad>
<uetn46$2bkun$1@dont-email.me> <3bzQM.36476$q0k.14387@fx34.iad>
<ueuj9u$2gdqk$3@dont-email.me> <eJCQM.35600$ugs.8334@fx36.iad>
<ueutjo$2ii89$2@dont-email.me> <S%pRM.268878$2ph4.195852@fx14.iad>
<uf6ecm$8rfg$1@dont-email.me> <n0NRM.30341$NkG.4566@fx41.iad>
<uf8dve$nt9u$1@dont-email.me> <ssZRM.206761$1B%c.192431@fx09.iad>
<ufaudd$1dfn9$1@dont-email.me> <l8nSM.46550$TwR4.32061@fx46.iad>
<ufdeog$2p2pl$1@dont-email.me> <LXKSM.296263$GHI6.117665@fx17.iad>
<ufg4nn$3cpgp$1@dont-email.me> <yPoTM.14960$sxoa.11892@fx13.iad>
<ufl7mr$oaud$4@dont-email.me> <fwxTM.15007$xTV9.7324@fx39.iad>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 5 Oct 2023 19:19:23 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="7a23c6f3444a9f69f3859d73c506f930";
logging-data="1159578"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+a8Z+XmU4OytGdL9mWMXtW50VctyOYs8I="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:Yzy+gbA5hqBSsR4b6TpuQ4Vvm2Y=
In-Reply-To: <fwxTM.15007$xTV9.7324@fx39.iad>
Content-Language: en-US
 by: Chris M. Thomasson - Thu, 5 Oct 2023 19:19 UTC

On 10/5/2023 4:56 AM, Richard Damon wrote:
> On 10/4/23 10:40 PM, Bonita Montero wrote:
>> Am 05.10.2023 um 04:03 schrieb Pavel:
>>> Bonita Montero wrote:
>>>> Am 03.10.2023 um 04:24 schrieb Pavel:
>>>>> Bonita Montero wrote:
>>>>>> Am 02.10.2023 um 01:19 schrieb Pavel:
>>>>>>
>>>>>>> Nope. The standard never says this specifically about
>>>>>>> mutex::lock. ...
>>>>>>
>>>>>> Of course, mutex::lock() may throw a system_error.
>>>>
>>>>> The standard does not say that; ...
>>>>
>>>> https://en.cppreference.com/w/cpp/thread/mutex/lock
>>>> "Throws std::system_error when errors occur"
>>>>
>>>>
>>> ccpreference.com is not the standard. Where it disagrees with the
>>> standard, the standard prevails.
>>
>> Idiot
>>
>
> Yes you are. And you just admitted you don't understand what a
> "Standard" is.
>
>

Bonita is special. ;^)

Re: Thread-safe initialization of static objects

<cqJTM.4374$w4ec.2019@fx14.iad>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2085&group=comp.lang.c%2B%2B#2085

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx14.iad.POSTED!not-for-mail
Subject: Re: Thread-safe initialization of static objects
Newsgroups: comp.lang.c++
References: <udafjf$2joeq$1@dont-email.me> <MTUPM.158223$Hih7.125749@fx11.iad>
<uep6pj$1b36d$1@dont-email.me> <byVPM.165856$Hih7.109980@fx11.iad>
<uep8vu$1bect$1@dont-email.me> <PKZPM.232647$ZXz4.71820@fx18.iad>
<ueqfkl$1i6un$2@dont-email.me> <Fa5QM.124660$1B%c.102962@fx09.iad>
<uerem0$1qg8s$1@dont-email.me> <ZYdQM.67167$3vM.17655@fx37.iad>
<uerv9b$1tqis$1@dont-email.me> <LJoQM.19137$EIy4.5875@fx48.iad>
<uetn46$2bkun$1@dont-email.me> <3bzQM.36476$q0k.14387@fx34.iad>
<ueuj9u$2gdqk$3@dont-email.me> <eJCQM.35600$ugs.8334@fx36.iad>
<ueutjo$2ii89$2@dont-email.me> <S%pRM.268878$2ph4.195852@fx14.iad>
<uf6ecm$8rfg$1@dont-email.me> <n0NRM.30341$NkG.4566@fx41.iad>
<uf8dve$nt9u$1@dont-email.me> <ssZRM.206761$1B%c.192431@fx09.iad>
<ufaudd$1dfn9$1@dont-email.me> <l8nSM.46550$TwR4.32061@fx46.iad>
<ufdeog$2p2pl$1@dont-email.me> <LXKSM.296263$GHI6.117665@fx17.iad>
<ufg4nn$3cpgp$1@dont-email.me> <yPoTM.14960$sxoa.11892@fx13.iad>
<ufl7mr$oaud$4@dont-email.me>
From: pauldontspamtolk@removeyourself.dontspam.yahoo (Pavel)
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
Firefox/91.0 SeaMonkey/2.53.17.1
MIME-Version: 1.0
In-Reply-To: <ufl7mr$oaud$4@dont-email.me>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 24
Message-ID: <cqJTM.4374$w4ec.2019@fx14.iad>
X-Complaints-To: https://www.astraweb.com/aup
NNTP-Posting-Date: Fri, 06 Oct 2023 01:29:44 UTC
Date: Thu, 5 Oct 2023 21:29:44 -0400
X-Received-Bytes: 2310
 by: Pavel - Fri, 6 Oct 2023 01:29 UTC

Bonita Montero wrote:
> Am 05.10.2023 um 04:03 schrieb Pavel:
>> Bonita Montero wrote:
>>> Am 03.10.2023 um 04:24 schrieb Pavel:
>>>> Bonita Montero wrote:
>>>>> Am 02.10.2023 um 01:19 schrieb Pavel:
>>>>>
>>>>>> Nope. The standard never says this specifically about mutex::lock.
>>>>>> ...
>>>>>
>>>>> Of course, mutex::lock() may throw a system_error.
>>>
>>>> The standard does not say that; ...
>>>
>>> https://en.cppreference.com/w/cpp/thread/mutex/lock
>>> "Throws std::system_error when errors occur"
>>>
>>>
>> ccpreference.com is not the standard. Where it disagrees with the
>> standard, the standard prevails.
>
> Idiot
>
I know you are

Re: Thread-safe initialization of static objects

<uftcn4$2tjm7$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2089&group=comp.lang.c%2B%2B#2089

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!nntp.comgw.net!weretis.net!feeder8.news.weretis.net!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Bonita.Montero@gmail.com (Bonita Montero)
Newsgroups: comp.lang.c++
Subject: Re: Thread-safe initialization of static objects
Date: Sun, 8 Oct 2023 06:54:59 +0200
Organization: A noiseless patient Spider
Lines: 16
Message-ID: <uftcn4$2tjm7$1@dont-email.me>
References: <udafjf$2joeq$1@dont-email.me> <MTUPM.158223$Hih7.125749@fx11.iad>
<uep6pj$1b36d$1@dont-email.me> <byVPM.165856$Hih7.109980@fx11.iad>
<uep8vu$1bect$1@dont-email.me> <PKZPM.232647$ZXz4.71820@fx18.iad>
<ueqfkl$1i6un$2@dont-email.me> <Fa5QM.124660$1B%c.102962@fx09.iad>
<uerem0$1qg8s$1@dont-email.me> <ZYdQM.67167$3vM.17655@fx37.iad>
<uerv9b$1tqis$1@dont-email.me> <LJoQM.19137$EIy4.5875@fx48.iad>
<uetn46$2bkun$1@dont-email.me> <3bzQM.36476$q0k.14387@fx34.iad>
<ueuj9u$2gdqk$3@dont-email.me> <eJCQM.35600$ugs.8334@fx36.iad>
<ueutjo$2ii89$2@dont-email.me> <S%pRM.268878$2ph4.195852@fx14.iad>
<uf6ecm$8rfg$1@dont-email.me> <n0NRM.30341$NkG.4566@fx41.iad>
<uf8dve$nt9u$1@dont-email.me> <ssZRM.206761$1B%c.192431@fx09.iad>
<ufaudd$1dfn9$1@dont-email.me> <l8nSM.46550$TwR4.32061@fx46.iad>
<ufdeog$2p2pl$1@dont-email.me> <LXKSM.296263$GHI6.117665@fx17.iad>
<ufg4nn$3cpgp$1@dont-email.me> <yPoTM.14960$sxoa.11892@fx13.iad>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 8 Oct 2023 04:55:00 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="2a97c7c65e49eb25905b1695db25aacd";
logging-data="3067591"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19uZHZrOtcQvxKKel/pRrOH6++q/m/iomE="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:1ommFygzxZtPorUYIlvn8tadpH4=
In-Reply-To: <yPoTM.14960$sxoa.11892@fx13.iad>
Content-Language: de-DE
 by: Bonita Montero - Sun, 8 Oct 2023 04:54 UTC

Am 05.10.2023 um 04:03 schrieb Pavel:

> ccpreference.com is not the standard. Where it disagrees with the
> standard, the standard prevails.

You're right, the standard even goes one step futher than cppreference:

* "The mutex types meet Cpp17DefaultConstructible and Cpp17Destructible.
If _initialization_ of an object of a mutex type fails, an exception
of type _system_error_ is thrown. ..."
* "The expression m.lock() is well-formed and has the following
semantics: ... Throws: _system_error_ when an exception is
required (33.2.2)."

So en.cppreference.com missed that initialization of a mutex
also might throw system_error.

Re: Thread-safe initialization of static objects

<ufte1n$2tq2s$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2090&group=comp.lang.c%2B%2B#2090

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: chris.m.thomasson.1@gmail.com (Chris M. Thomasson)
Newsgroups: comp.lang.c++
Subject: Re: Thread-safe initialization of static objects
Date: Sat, 7 Oct 2023 22:17:42 -0700
Organization: A noiseless patient Spider
Lines: 79
Message-ID: <ufte1n$2tq2s$1@dont-email.me>
References: <udafjf$2joeq$1@dont-email.me> <uetn46$2bkun$1@dont-email.me>
<3bzQM.36476$q0k.14387@fx34.iad> <ueuj9u$2gdqk$3@dont-email.me>
<00d0c42f-7728-4a7b-9611-3f24f98735ffn@googlegroups.com>
<d1fc9003-673c-4d7b-ad17-d37a75c39bd3n@googlegroups.com>
<uf3npo$3li66$1@dont-email.me>
<3d9a2d52-5a7d-4a6f-b4a6-1aa98feba2e7n@googlegroups.com>
<uf3siu$3me1l$1@dont-email.me>
<0362fb54-0227-4cd2-8676-419a34c8fdb4n@googlegroups.com>
<uf6edv$8rfg$2@dont-email.me>
<e3c26612-d4dd-4428-8e56-17ce08a4da21n@googlegroups.com>
<uf6f5a$8vee$1@dont-email.me>
<6ba8ab42-f622-4c48-973e-8800f3f44a66n@googlegroups.com>
<861qehggye.fsf@linuxsc.com> <uf75ud$de0v$1@dont-email.me>
<uf76hu$di35$1@dont-email.me> <uf76t9$de0v$3@dont-email.me>
<uf77d7$dnjd$1@dont-email.me> <uf78do$dsh0$1@dont-email.me>
<uf78l4$dujs$1@dont-email.me> <uf7902$dsh0$5@dont-email.me>
<uf793c$dsh0$6@dont-email.me> <uf79dv$e2qr$1@dont-email.me>
<uf7aue$ebr7$1@dont-email.me> <uf7b7t$ed7c$1@dont-email.me>
<20230929131726.291@kylheku.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 8 Oct 2023 05:17:43 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="ebca3b7c70a663ebe6c771f7b2cfc517";
logging-data="3074140"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+9xQjQMFSfl5xYSeCuQsyec32S59LmM40="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:F9lCvkrVgK8fpvKxPIQqSCgWjUI=
In-Reply-To: <20230929131726.291@kylheku.com>
Content-Language: en-US
 by: Chris M. Thomasson - Sun, 8 Oct 2023 05:17 UTC

On 9/29/2023 1:44 PM, Kaz Kylheku wrote:
> On 2023-09-29, Bonita Montero <Bonita.Montero@gmail.com> wrote:
>> Am 29.09.2023 um 22:09 schrieb Chris M. Thomasson:
>>
>>> Huh? The code you write always has race conditions? Huh?
>>
>> Theres a random factor which determines who acquires a mutex first.
>> So this is a true race condition. So a race condtition can be totally
>> acceptable inside a mutex, but not outside a mutes with the code that
>> uses the mutex.
>
> The concept of a race condition is broad; it spans beyond software.
>
> A race condition is a situation in which the system's behavior being
> correct or incorrect depends on the incidental order of events between
> unrelated event streams.
>
> The system design assumes, for its correctness, that a certain event X
> happens before Y, but this is not ensured and sometimes doesn't happen
> because X and Y come from different event sources/streams which are not
> synchronized.
>
> In software, if we have divided the execution of a program into multiple
> scheduling contexts, like threads, it's possible that the program will
> arrive at its result via different execution orders. If for all
> execution orders, the result is correct, then there is no race
> condition.
>
> Your mutex-based program may exhibit different execution orders.
>
> There is no race condition unless some of the execution orders produce
> an incorrect result.
>
> Unfortunately, we cannot speak about correctness without referring to
> the specification of the individual program. Correctness is not
> absolute.
>
> Suppose we have a specification "write a program that prints all the
> integers in the range 1 to 10, on a separate linee". We can have the
> program launch ten threads, give each of the threads one of those
> integers as an argument. Each thread prints the argument and
> terminates.
>
> If we see an output like, this it is correct:
>
> 7
> 3
> 1
> 6
> 9
> 8
> 4
> 5
> 2
> 10
>
> (Assume that we never see bad character interleaving; the I/O library
> takes care of that.)
>
> Now suppose we change the requirements that the integers have to be
> presented in increasing order.
>
> Then the same program is no longer correct, and we can identify it as
> having race conditions.
>
> It starts the 1-10 threads in order, but they don't issue their output
> in that order.
>
> The program hasn't change at all, only the specification of what is
> correct, and that causes the program to have a race condition.
>
> We agree that there are always perturbations in execution order
> regardless of how correcntess is defined: the program does what it does.
>
> A perturbation in execution order isn't a race; only when it
> makes the program incorrect w.r.t it specification.
>

Well, that is pretty much it.

Re: Thread-safe initialization of static objects

<DmnWM.47186$HwD9.32525@fx11.iad>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2165&group=comp.lang.c%2B%2B#2165

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!peer02.ams1!peer.ams1.xlned.com!news.xlned.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx11.iad.POSTED!not-for-mail
Subject: Re: Thread-safe initialization of static objects
Newsgroups: comp.lang.c++
References: <udafjf$2joeq$1@dont-email.me> <MTUPM.158223$Hih7.125749@fx11.iad>
<uep6pj$1b36d$1@dont-email.me> <byVPM.165856$Hih7.109980@fx11.iad>
<uep8vu$1bect$1@dont-email.me> <PKZPM.232647$ZXz4.71820@fx18.iad>
<ueqfkl$1i6un$2@dont-email.me> <Fa5QM.124660$1B%c.102962@fx09.iad>
<uerem0$1qg8s$1@dont-email.me> <ZYdQM.67167$3vM.17655@fx37.iad>
<uerv9b$1tqis$1@dont-email.me> <LJoQM.19137$EIy4.5875@fx48.iad>
<uetn46$2bkun$1@dont-email.me> <3bzQM.36476$q0k.14387@fx34.iad>
<ueuj9u$2gdqk$3@dont-email.me> <eJCQM.35600$ugs.8334@fx36.iad>
<ueutjo$2ii89$2@dont-email.me> <S%pRM.268878$2ph4.195852@fx14.iad>
<uf6ecm$8rfg$1@dont-email.me> <n0NRM.30341$NkG.4566@fx41.iad>
<uf8dve$nt9u$1@dont-email.me> <ssZRM.206761$1B%c.192431@fx09.iad>
<ufaudd$1dfn9$1@dont-email.me> <l8nSM.46550$TwR4.32061@fx46.iad>
<ufdeog$2p2pl$1@dont-email.me> <LXKSM.296263$GHI6.117665@fx17.iad>
<ufg4nn$3cpgp$1@dont-email.me> <yPoTM.14960$sxoa.11892@fx13.iad>
<uftcn4$2tjm7$1@dont-email.me>
From: pauldontspamtolk@removeyourself.dontspam.yahoo (Pavel)
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
Firefox/91.0 SeaMonkey/2.53.17.1
MIME-Version: 1.0
In-Reply-To: <uftcn4$2tjm7$1@dont-email.me>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Lines: 23
Message-ID: <DmnWM.47186$HwD9.32525@fx11.iad>
X-Complaints-To: https://www.astraweb.com/aup
NNTP-Posting-Date: Sat, 14 Oct 2023 02:51:15 UTC
Date: Fri, 13 Oct 2023 22:51:15 -0400
X-Received-Bytes: 2742
 by: Pavel - Sat, 14 Oct 2023 02:51 UTC

Bonita Montero wrote:
> Am 05.10.2023 um 04:03 schrieb Pavel:
>
>> ccpreference.com is not the standard. Where it disagrees with the
>> standard, the standard prevails.
>
> You're right, the standard even goes one step futher than cppreference:
>
> * "The mutex types meet Cpp17DefaultConstructible and Cpp17Destructible.
>    If _initialization_ of an object of a mutex type fails, an exception
>    of type _system_error_ is thrown. ..."
> * "The expression m.lock() is well-formed and has the following
>   semantics: ... Throws: _system_error_ when an exception is
>   required (33.2.2)."
Did you read what your cited? "when an exception is required (33.2.2)"
for std::mutex, exception is not required unless the mutex is deadlock
detecting (and deadlock-detecting mutex is not appropriate to use for
static initialization). But it is good you at least starting to read.
>
> So en.cppreference.com missed that initialization of a mutex
> also might throw system_error.

Pages:123456789101112131415161718192021222324252627
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor