Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

To downgrade the human mind is bad theology. -- C. K. Chesterton


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

<uf79a2$dsh0$7@dont-email.me>

  copy mid

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

  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: Fri, 29 Sep 2023 12:41:54 -0700
Organization: A noiseless patient Spider
Lines: 11
Message-ID: <uf79a2$dsh0$7@dont-email.me>
References: <udafjf$2joeq$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>
<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>
<uf78fo$dsh0$2@dont-email.me> <uf78n7$dujs$2@dont-email.me>
<uf78rd$dsh0$4@dont-email.me> <uf791g$e0t3$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 29 Sep 2023 19:41:54 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="20313435b82470e1f6eec4f85dde8931";
logging-data="455200"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/NjSVjTqOHf40LAUyEdveQl4z7yGagkoQ="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.15.1
Cancel-Lock: sha1:2Z3gj0ZnA/ZI54icWqoAsksGuvk=
In-Reply-To: <uf791g$e0t3$1@dont-email.me>
Content-Language: en-US
 by: Chris M. Thomasson - Fri, 29 Sep 2023 19:41 UTC

On 9/29/2023 12:37 PM, Bonita Montero wrote:
> Am 29.09.2023 um 21:34 schrieb Chris M. Thomasson:
>
>> Huh? Run your code through a race detector and we can go from there.
>> You want me to try to find a bug in the code you posted? Well, pay me.
>
> Idiot !

Oh yeah. I am going to do work for you. At least give it a go wrt a race
detector, then we can see some interesting things. Of course I can read
your code and do it by myself, but, its going to cost you.

Re: Thread-safe initialization of static objects

<uf79dv$e2qr$1@dont-email.me>

  copy mid

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

  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: Fri, 29 Sep 2023 21:43:59 +0200
Organization: A noiseless patient Spider
Lines: 8
Message-ID: <uf79dv$e2qr$1@dont-email.me>
References: <udafjf$2joeq$1@dont-email.me> <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>
<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>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 29 Sep 2023 19:43:59 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="d258e34836ce4d1fad690ea3ecd020af";
logging-data="461659"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/YmKAJDYgKR9wdk5ELHJ3jmfy9CalO4wM="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:pbCmVMfJiVNP+OZqEzqg7NZ7WpY=
In-Reply-To: <uf793c$dsh0$6@dont-email.me>
Content-Language: de-DE
 by: Bonita Montero - Fri, 29 Sep 2023 19:43 UTC

Am 29.09.2023 um 21:38 schrieb Chris M. Thomasson:

> Say, a race detector finds a race condition in your code. You examine it
> and can _prove_ that it works, well, then the race detector was wrong.
> We can now dive into it.

Mutexes or the shared mutex I wrote always have race conditions
and that's not a problem.

Re: Thread-safe initialization of static objects

<uf79gv$dsh0$8@dont-email.me>

  copy mid

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

  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: Fri, 29 Sep 2023 12:45:35 -0700
Organization: A noiseless patient Spider
Lines: 18
Message-ID: <uf79gv$dsh0$8@dont-email.me>
References: <udafjf$2joeq$1@dont-email.me> <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>
<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>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 29 Sep 2023 19:45:35 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="20313435b82470e1f6eec4f85dde8931";
logging-data="455200"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18ZW23LG8ObMPDOxaO4uWmBzDz62eh+2E4="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.15.1
Cancel-Lock: sha1:HxXjR72a3tUXYOdrG+IaQU3UI/U=
Content-Language: en-US
In-Reply-To: <uf7902$dsh0$5@dont-email.me>
 by: Chris M. Thomasson - Fri, 29 Sep 2023 19:45 UTC

On 9/29/2023 12:36 PM, Chris M. Thomasson wrote:
> On 9/29/2023 12:30 PM, Bonita Montero wrote:
>> Am 29.09.2023 um 21:26 schrieb Chris M. Thomasson:
>>
>>> Run it through a race detector, make sure it works.
>>
>> Your only answer to any MT-code that overburdens you is:
>> use a race detector.
>>
>
> Huh? Lets make sure it passes some tests, then we can dig into it. There
> could be a false negative.

negative, in the sense of a failed test.

I don't think you like to test any of your
> own code. Just throwing some example runs at it is not enough.

Re: Thread-safe initialization of static objects

<uf7aue$ebr7$1@dont-email.me>

  copy mid

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

  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: Fri, 29 Sep 2023 13:09:50 -0700
Organization: A noiseless patient Spider
Lines: 15
Message-ID: <uf7aue$ebr7$1@dont-email.me>
References: <udafjf$2joeq$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>
<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>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 29 Sep 2023 20:09:50 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="20313435b82470e1f6eec4f85dde8931";
logging-data="470887"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/Pm7hE22iUC2/FkB7gYDX0o6U+1qiM9s4="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.15.1
Cancel-Lock: sha1:NStUksCCi0OWQWEh+C6nIZaBVWU=
In-Reply-To: <uf79dv$e2qr$1@dont-email.me>
Content-Language: en-US
 by: Chris M. Thomasson - Fri, 29 Sep 2023 20:09 UTC

On 9/29/2023 12:43 PM, Bonita Montero wrote:
> Am 29.09.2023 um 21:38 schrieb Chris M. Thomasson:
>
>> Say, a race detector finds a race condition in your code. You examine
>> it and can _prove_ that it works, well, then the race detector was
>> wrong. We can now dive into it.
>
> Mutexes or the shared mutex I wrote always have race conditions
> and that's not a problem.

Huh? The code you write always has race conditions? Huh?

Oh my. You, well, shit. This is a troll!!! Has to be?

;^o

Re: Thread-safe initialization of static objects

<uf7b7t$ed7c$1@dont-email.me>

  copy mid

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

  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: Fri, 29 Sep 2023 22:14:54 +0200
Organization: A noiseless patient Spider
Lines: 9
Message-ID: <uf7b7t$ed7c$1@dont-email.me>
References: <udafjf$2joeq$1@dont-email.me> <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>
<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>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 29 Sep 2023 20:14:53 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="d258e34836ce4d1fad690ea3ecd020af";
logging-data="472300"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19dogro+dz24Lu/b9m59C7EusZ3yJapE5g="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:o2mpOwNaBM3qHOH1hFM9GNNX8tw=
Content-Language: de-DE
In-Reply-To: <uf7aue$ebr7$1@dont-email.me>
 by: Bonita Montero - Fri, 29 Sep 2023 20:14 UTC

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.

Re: Thread-safe initialization of static objects

<uf7c14$eicb$1@dont-email.me>

  copy mid

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

  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: Fri, 29 Sep 2023 13:28:17 -0700
Organization: A noiseless patient Spider
Lines: 31
Message-ID: <uf7c14$eicb$1@dont-email.me>
References: <udafjf$2joeq$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>
<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>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 29 Sep 2023 20:28:20 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="20313435b82470e1f6eec4f85dde8931";
logging-data="477579"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX198Gi2wiWCXnyn07EDhZX1tQA9nVLqZjQA="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.15.1
Cancel-Lock: sha1:BZxNcBXxHJKJuj2sRbddyBORq+s=
Content-Language: en-US
In-Reply-To: <uf7b7t$ed7c$1@dont-email.me>
 by: Chris M. Thomasson - Fri, 29 Sep 2023 20:28 UTC

On 9/29/2023 1:14 PM, Bonita Montero 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.

Oh god, please! That is a massive red herring.

> So a race condtition can be totally
> acceptable inside a mutex, but not outside a mutes with the code that
> uses the mutex.
>

Moronic word salad. For fun, check this out:

https://groups.google.com/g/comp.lang.c++/c/7u_rLgQe86k/m/fYU9SnuAFQAJ

;^)

A race condition can make things give erroneous results, can lead to
deadlock, can do a bunch of terrible things. The worst type of race
condition tends to be memory barrier based. The atomic rmw's are working
an in place, but the memory visibility is all screwed to hell and back.
So, the system might appear to be working fine, but will fuck up over time.

Who gets to lock first is a wild red herring. I don't think you know
what a race condition actually is.

Re: Thread-safe initialization of static objects

<uf7c49$eil1$1@dont-email.me>

  copy mid

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

  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: Fri, 29 Sep 2023 13:30:01 -0700
Organization: A noiseless patient Spider
Lines: 5
Message-ID: <uf7c49$eil1$1@dont-email.me>
References: <udafjf$2joeq$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 29 Sep 2023 20:30:01 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="20313435b82470e1f6eec4f85dde8931";
logging-data="477857"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/pM9CrfS8jdcKUQ7J8FfTnEa8dX6U18XY="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.15.1
Cancel-Lock: sha1:lRLZ7iwZLro+5QRNyyogMQBQ7Q0=
Content-Language: en-US
In-Reply-To: <udafjf$2joeq$1@dont-email.me>
 by: Chris M. Thomasson - Fri, 29 Sep 2023 20:30 UTC

On 9/6/2023 11:15 AM, Bonita Montero wrote:
[...]

I am going to refrain from talking to you for a while. Sorry, but you
simply must be trolling.

Re: Thread-safe initialization of static objects

<20230929131726.291@kylheku.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: 864-117-4973@kylheku.com (Kaz Kylheku)
Newsgroups: comp.lang.c++
Subject: Re: Thread-safe initialization of static objects
Date: Fri, 29 Sep 2023 20:44:05 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 81
Message-ID: <20230929131726.291@kylheku.com>
References: <udafjf$2joeq$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>
<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>
Injection-Date: Fri, 29 Sep 2023 20:44:05 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="3e2464a16a598f67870a96179f3b3745";
logging-data="483166"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18U6MCD3a5xOaiFdLj/LMR7OePWNIQMzdE="
User-Agent: slrn/pre1.0.4-9 (Linux)
Cancel-Lock: sha1:HhgUfZpupVoD3T7eMIgoISMB+1U=
 by: Kaz Kylheku - Fri, 29 Sep 2023 20:44 UTC

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.

--
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca
NOTE: If you use Google Groups, I don't see you, unless you're whitelisted.

Re: Thread-safe initialization of static objects

<uf7fpf$f6vc$1@dont-email.me>

  copy mid

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

  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: Fri, 29 Sep 2023 23:32:31 +0200
Organization: A noiseless patient Spider
Lines: 8
Message-ID: <uf7fpf$f6vc$1@dont-email.me>
References: <udafjf$2joeq$1@dont-email.me> <uf7c49$eil1$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 29 Sep 2023 21:32:31 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="d258e34836ce4d1fad690ea3ecd020af";
logging-data="498668"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX184YpNAoWFv3aE0KB817fGHH8WgVrlJixc="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:0BbFCkebLmIKvKj1yPpY7G/18+E=
Content-Language: de-DE
In-Reply-To: <uf7c49$eil1$1@dont-email.me>
 by: Bonita Montero - Fri, 29 Sep 2023 21:32 UTC

Am 29.09.2023 um 22:30 schrieb Chris M. Thomasson:

> I am going to refrain from talking to you for a while. Sorry, but you
> simply must be trolling.

You never deal with the source you read here, but always come up with
the answer: use a race detector. That's trolling !

Re: Thread-safe initialization of static objects

<n0NRM.30341$NkG.4566@fx41.iad>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx41.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>
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: <uf6ecm$8rfg$1@dont-email.me>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 10
Message-ID: <n0NRM.30341$NkG.4566@fx41.iad>
X-Complaints-To: https://www.astraweb.com/aup
NNTP-Posting-Date: Sat, 30 Sep 2023 03:57:07 UTC
Date: Fri, 29 Sep 2023 23:57:07 -0400
X-Received-Bytes: 1617
 by: Pavel - Sat, 30 Sep 2023 03:57 UTC

Bonita Montero wrote:
> Am 29.09.2023 um 03:46 schrieb Pavel:
>
>> see my or Kaz's explanation for how it is done without allocating any
>> kernel resource on either initialization or locking, either fast or
>> slow path.
>
> ... on Linux with signals.
>
With user-space sync primitives on any system.

Re: Thread-safe initialization of static objects

<uf8dve$nt9u$1@dont-email.me>

  copy mid

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

  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: Sat, 30 Sep 2023 08:07:43 +0200
Organization: A noiseless patient Spider
Lines: 15
Message-ID: <uf8dve$nt9u$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>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 30 Sep 2023 06:07:42 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="fc361745595643c5f2a094813cd73619";
logging-data="783678"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+iKmFgf2ty+HO85o0hHriJ6NOE+VSd/90="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:UO6qS/Oe40SptG+p5MmyoH97/Mg=
Content-Language: de-DE
In-Reply-To: <n0NRM.30341$NkG.4566@fx41.iad>
 by: Bonita Montero - Sat, 30 Sep 2023 06:07 UTC

Am 30.09.2023 um 05:57 schrieb Pavel:
> Bonita Montero wrote:
>> Am 29.09.2023 um 03:46 schrieb Pavel:
>>
>>> see my or Kaz's explanation for how it is done without allocating any
>>> kernel resource on either initialization or locking, either fast or
>>> slow path.
>>
>> ... on Linux with signals.
>>
> With user-space sync primitives on any system.

A mutex may lead to a sleeping thread, that's only possible with
the help of the kernel.

Re: Thread-safe initialization of static objects

<uf8p06$pqv8$1@dont-email.me>

  copy mid

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

  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: Sat, 30 Sep 2023 11:15:51 +0200
Organization: A noiseless patient Spider
Lines: 9
Message-ID: <uf8p06$pqv8$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: Sat, 30 Sep 2023 09:15:50 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="fc361745595643c5f2a094813cd73619";
logging-data="846824"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+nM89dukfryVSBkVVbLExDEwIkd3KgKnA="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:YXcLgMfieD55astgcuGyMdXno/M=
Content-Language: de-DE
In-Reply-To: <20230929131726.291@kylheku.com>
 by: Bonita Montero - Sat, 30 Sep 2023 09:15 UTC

Am 29.09.2023 um 22:44 schrieb Kaz Kylheku:

> The concept of a race condition is broad; it spans beyond software.

And a race condition isn't always a problem. If there are different
outcoomes of a race condition either outcome may be acceptable if
the outcome has consistent data.

Re: Thread-safe initialization of static objects

<20230930084915.779@kylheku.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: 864-117-4973@kylheku.com (Kaz Kylheku)
Newsgroups: comp.lang.c++
Subject: Re: Thread-safe initialization of static objects
Date: Sat, 30 Sep 2023 15:51:28 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 17
Message-ID: <20230930084915.779@kylheku.com>
References: <udafjf$2joeq$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> <uf8p06$pqv8$1@dont-email.me>
Injection-Date: Sat, 30 Sep 2023 15:51:28 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="679a31b8742704f50c45f4a799bdb5b6";
logging-data="1039444"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18b4IIe3kBHFjge1Cr7Sr6iKmFIqAb08io="
User-Agent: slrn/pre1.0.4-9 (Linux)
Cancel-Lock: sha1:eY654b1QunpI7pIskZ2pMnU7Poo=
 by: Kaz Kylheku - Sat, 30 Sep 2023 15:51 UTC

On 2023-09-30, Bonita Montero <Bonita.Montero@gmail.com> wrote:
> Am 29.09.2023 um 22:44 schrieb Kaz Kylheku:
>
>> The concept of a race condition is broad; it spans beyond software.
>
> And a race condition isn't always a problem.

As I explained, "race condition" is the name of a problem by definition.

Perturbed execution order, with externally visible differences in
behavior, is not always a problem.

> If there are different
> outcoomes of a race condition either outcome may be acceptable if
> the outcome has consistent data.

I.e. you forgot "Rest unread".

Re: Thread-safe initialization of static objects

<uf9gu2$100tn$1@dont-email.me>

  copy mid

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

  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: Sat, 30 Sep 2023 18:04:19 +0200
Organization: A noiseless patient Spider
Lines: 5
Message-ID: <uf9gu2$100tn$1@dont-email.me>
References: <udafjf$2joeq$1@dont-email.me> <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> <uf8p06$pqv8$1@dont-email.me>
<20230930084915.779@kylheku.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 30 Sep 2023 16:04:18 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="fc361745595643c5f2a094813cd73619";
logging-data="1049527"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+GHDVbHVpW6w3EUVV4sPp2RclaLVuKCCg="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:scMZMiNeJtiU+lNLUsNEs91zVnU=
Content-Language: de-DE
In-Reply-To: <20230930084915.779@kylheku.com>
 by: Bonita Montero - Sat, 30 Sep 2023 16:04 UTC

Am 30.09.2023 um 17:51 schrieb Kaz Kylheku:

> I.e. you forgot "Rest unread".

You get lost in unimportant details, not me.

Re: Thread-safe initialization of static objects

<20230930100140.264@kylheku.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: 864-117-4973@kylheku.com (Kaz Kylheku)
Newsgroups: comp.lang.c++
Subject: Re: Thread-safe initialization of static objects
Date: Sat, 30 Sep 2023 17:05:19 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 16
Message-ID: <20230930100140.264@kylheku.com>
References: <udafjf$2joeq$1@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> <uf8p06$pqv8$1@dont-email.me>
<20230930084915.779@kylheku.com> <uf9gu2$100tn$1@dont-email.me>
Injection-Date: Sat, 30 Sep 2023 17:05:19 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="679a31b8742704f50c45f4a799bdb5b6";
logging-data="1090714"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/pE8QNnwxYfrbWVPDKTV8U7Hcw1dv176c="
User-Agent: slrn/pre1.0.4-9 (Linux)
Cancel-Lock: sha1:/K3hUpsd1emQ2B0V4m6PHTb0nzE=
 by: Kaz Kylheku - Sat, 30 Sep 2023 17:05 UTC

On 2023-09-30, Bonita Montero <Bonita.Montero@gmail.com> wrote:
> Am 30.09.2023 um 17:51 schrieb Kaz Kylheku:
>
>> I.e. you forgot "Rest unread".
>
> You get lost in unimportant details, not me.

It's fairly important not to call perturbed execution orders
in a correct program "race conditions" because it communicates
not knowing the subject matter.

--
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca
NOTE: If you use Google Groups, I don't see you, unless you're whitelisted.

Re: Thread-safe initialization of static objects

<uf9lok$11nrv$1@dont-email.me>

  copy mid

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

  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: Sat, 30 Sep 2023 19:26:45 +0200
Organization: A noiseless patient Spider
Lines: 13
Message-ID: <uf9lok$11nrv$1@dont-email.me>
References: <udafjf$2joeq$1@dont-email.me>
<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> <uf8p06$pqv8$1@dont-email.me>
<20230930084915.779@kylheku.com> <uf9gu2$100tn$1@dont-email.me>
<20230930100140.264@kylheku.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 30 Sep 2023 17:26:44 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="fc361745595643c5f2a094813cd73619";
logging-data="1105791"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+hRw9CYXfZ3SGr5ZapPa/H8RngjxnaQDY="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:ful/y816qRYDLVgXmzSFH6J5nXw=
In-Reply-To: <20230930100140.264@kylheku.com>
Content-Language: de-DE
 by: Bonita Montero - Sat, 30 Sep 2023 17:26 UTC

Am 30.09.2023 um 19:05 schrieb Kaz Kylheku:

> On 2023-09-30, Bonita Montero <Bonita.Montero@gmail.com> wrote:

>> You get lost in unimportant details, not me.

> It's fairly important not to call perturbed execution orders
> in a correct program "race conditions" because it communicates
> not knowing the subject matter.

I mean: unimportant at this place, but not generally.

Re: Thread-safe initialization of static objects

<ssZRM.206761$1B%c.192431@fx09.iad>

  copy mid

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

  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!fx09.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>
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: <uf8dve$nt9u$1@dont-email.me>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 24
Message-ID: <ssZRM.206761$1B%c.192431@fx09.iad>
X-Complaints-To: https://www.astraweb.com/aup
NNTP-Posting-Date: Sat, 30 Sep 2023 18:06:16 UTC
Date: Sat, 30 Sep 2023 14:06:09 -0400
X-Received-Bytes: 2431
 by: Pavel - Sat, 30 Sep 2023 18:06 UTC

Bonita Montero wrote:
> Am 30.09.2023 um 05:57 schrieb Pavel:
>> Bonita Montero wrote:
>>> Am 29.09.2023 um 03:46 schrieb Pavel:
>>>
>>>> see my or Kaz's explanation for how it is done without allocating
>>>> any kernel resource on either initialization or locking, either fast
>>>> or slow path.
>>>
>>> ... on Linux with signals.
>>>
>> With user-space sync primitives on any system.
>
> A mutex may lead to a sleeping thread, that's only possible with
> the help of the kernel.

This does not prove that the kernel call to acquire the primitive may
fail. You made a more specific statement that the kernel had to allocate
resources on either initialization or locking and that could fail. And
that your statement was incorrect: the kernel does not have to allocate
resources, it may simply need to relink the thread from runqueue to the
user-space primitives's waiting list. This cannot fail. And hence the
C++ static variable initialization does not have to throw for
synchronization reasons. No need to change the standard.

Re: Thread-safe initialization of static objects

<Ub_RM.340961$ZXz4.125626@fx18.iad>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx18.iad.POSTED!not-for-mail
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: Thread-safe initialization of static objects
Newsgroups: comp.lang.c++
References: <udafjf$2joeq$1@dont-email.me> <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> <uf8p06$pqv8$1@dont-email.me>
<20230930084915.779@kylheku.com> <uf9gu2$100tn$1@dont-email.me>
<20230930100140.264@kylheku.com> <uf9lok$11nrv$1@dont-email.me>
From: Richard@Damon-Family.org (Richard Damon)
Content-Language: en-US
In-Reply-To: <uf9lok$11nrv$1@dont-email.me>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 18
Message-ID: <Ub_RM.340961$ZXz4.125626@fx18.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: Sat, 30 Sep 2023 14:56:52 -0400
X-Received-Bytes: 2219
 by: Richard Damon - Sat, 30 Sep 2023 18:56 UTC

On 9/30/23 1:26 PM, Bonita Montero wrote:
> Am 30.09.2023 um 19:05 schrieb Kaz Kylheku:
>
>> On 2023-09-30, Bonita Montero <Bonita.Montero@gmail.com> wrote:
>
>>> You get lost in unimportant details, not me.
>
>> It's fairly important not to call perturbed execution orders
>> in a correct program "race conditions" because it communicates
>> not knowing the subject matter.
>
> I mean: unimportant at this place, but not generally.
>
>

When is it EVER "unimportant" that you are using incorrect terminology.

Re: Thread-safe initialization of static objects

<20230930120011.66@kylheku.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: 864-117-4973@kylheku.com (Kaz Kylheku)
Newsgroups: comp.lang.c++
Subject: Re: Thread-safe initialization of static objects
Date: Sat, 30 Sep 2023 19:07:38 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 30
Message-ID: <20230930120011.66@kylheku.com>
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>
Injection-Date: Sat, 30 Sep 2023 19:07:38 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="679a31b8742704f50c45f4a799bdb5b6";
logging-data="1144831"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18X3NJI9HdEYnG1XPDBouW5aFxzR2fNTmo="
User-Agent: slrn/pre1.0.4-9 (Linux)
Cancel-Lock: sha1:eTsRheZhTK7DUEPOaO69OAR6F8s=
 by: Kaz Kylheku - Sat, 30 Sep 2023 19:07 UTC

On 2023-09-30, Bonita Montero <Bonita.Montero@gmail.com> wrote:
> Am 30.09.2023 um 05:57 schrieb Pavel:
>> Bonita Montero wrote:
>>> Am 29.09.2023 um 03:46 schrieb Pavel:
>>>
>>>> see my or Kaz's explanation for how it is done without allocating any
>>>> kernel resource on either initialization or locking, either fast or
>>>> slow path.
>>>
>>> ... on Linux with signals.
>>>
>> With user-space sync primitives on any system.
>
> A mutex may lead to a sleeping thread, that's only possible with
> the help of the kernel.

You keep returning to this in circles, forgetting that the argument
isn't that help from the kernel isn't required.

The argument is that there is no need to allocate a kernel
object per mutex. That is only one point in the design space,
and not a very good one.

Do *you* have ADHD is the question.

--
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca
NOTE: If you use Google Groups, I don't see you, unless you're whitelisted.

Re: Thread-safe initialization of static objects

<20230930120757.765@kylheku.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: 864-117-4973@kylheku.com (Kaz Kylheku)
Newsgroups: comp.lang.c++
Subject: Re: Thread-safe initialization of static objects
Date: Sat, 30 Sep 2023 19:10:55 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 27
Message-ID: <20230930120757.765@kylheku.com>
References: <udafjf$2joeq$1@dont-email.me> <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> <uf8p06$pqv8$1@dont-email.me>
<20230930084915.779@kylheku.com> <uf9gu2$100tn$1@dont-email.me>
<20230930100140.264@kylheku.com> <uf9lok$11nrv$1@dont-email.me>
<Ub_RM.340961$ZXz4.125626@fx18.iad>
Injection-Date: Sat, 30 Sep 2023 19:10:55 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="679a31b8742704f50c45f4a799bdb5b6";
logging-data="1144831"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19nKUPAhmqSXaNKFbnrRnbgKA6f16E6vAI="
User-Agent: slrn/pre1.0.4-9 (Linux)
Cancel-Lock: sha1:MK92+zj6Q08mhHy5Ri/Vba/0ZQQ=
 by: Kaz Kylheku - Sat, 30 Sep 2023 19:10 UTC

On 2023-09-30, Richard Damon <Richard@Damon-Family.org> wrote:
> On 9/30/23 1:26 PM, Bonita Montero wrote:
>> Am 30.09.2023 um 19:05 schrieb Kaz Kylheku:
>>
>>> On 2023-09-30, Bonita Montero <Bonita.Montero@gmail.com> wrote:
>>
>>>> You get lost in unimportant details, not me.
>>
>>> It's fairly important not to call perturbed execution orders
>>> in a correct program "race conditions" because it communicates
>>> not knowing the subject matter.
>>
>> I mean: unimportant at this place, but not generally.
>>
>>
>
> When is it EVER "unimportant" that you are using incorrect terminology.

When you're trolling under a pseudonym.

That is unmistakably what "unimportant in this place" means.

--
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca
NOTE: If you use Google Groups, I don't see you, unless you're whitelisted.

Re: Thread-safe initialization of static objects

<uf9skt$137hd$1@dont-email.me>

  copy mid

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

  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, 30 Sep 2023 12:24:12 -0700
Organization: A noiseless patient Spider
Lines: 14
Message-ID: <uf9skt$137hd$1@dont-email.me>
References: <udafjf$2joeq$1@dont-email.me>
<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> <uf8p06$pqv8$1@dont-email.me>
<20230930084915.779@kylheku.com> <uf9gu2$100tn$1@dont-email.me>
<20230930100140.264@kylheku.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 30 Sep 2023 19:24:13 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="3c13a05f8f36ad7f4d3864df47ab6ff2";
logging-data="1154605"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1825jxgNwfIWxf9XnozMzblw7usYMzpUXs="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.15.1
Cancel-Lock: sha1:bxEBhuk8B8niWAccmR+ZdG7S29A=
In-Reply-To: <20230930100140.264@kylheku.com>
Content-Language: en-US
 by: Chris M. Thomasson - Sat, 30 Sep 2023 19:24 UTC

On 9/30/2023 10:05 AM, Kaz Kylheku wrote:
> On 2023-09-30, Bonita Montero <Bonita.Montero@gmail.com> wrote:
>> Am 30.09.2023 um 17:51 schrieb Kaz Kylheku:
>>
>>> I.e. you forgot "Rest unread".
>>
>> You get lost in unimportant details, not me.
>
> It's fairly important not to call perturbed execution orders
> in a correct program "race conditions" because it communicates
> not knowing the subject matter.
>

Yup. Exactly.

Re: Thread-safe initialization of static objects

<uf9t1e$137hd$2@dont-email.me>

  copy mid

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

  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, 30 Sep 2023 12:30:54 -0700
Organization: A noiseless patient Spider
Lines: 32
Message-ID: <uf9t1e$137hd$2@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> <20230930120011.66@kylheku.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 30 Sep 2023 19:30:54 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="3c13a05f8f36ad7f4d3864df47ab6ff2";
logging-data="1154605"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18pyZTZoX5RzW4+Joel+ltMIjaZ8UAuoRQ="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.15.1
Cancel-Lock: sha1:dRgwMWSNNQ9iBLa8NiHzmHUfOnU=
Content-Language: en-US
In-Reply-To: <20230930120011.66@kylheku.com>
 by: Chris M. Thomasson - Sat, 30 Sep 2023 19:30 UTC

On 9/30/2023 12:07 PM, Kaz Kylheku wrote:
> On 2023-09-30, Bonita Montero <Bonita.Montero@gmail.com> wrote:
>> Am 30.09.2023 um 05:57 schrieb Pavel:
>>> Bonita Montero wrote:
>>>> Am 29.09.2023 um 03:46 schrieb Pavel:
>>>>
>>>>> see my or Kaz's explanation for how it is done without allocating any
>>>>> kernel resource on either initialization or locking, either fast or
>>>>> slow path.
>>>>
>>>> ... on Linux with signals.
>>>>
>>> With user-space sync primitives on any system.
>>
>> A mutex may lead to a sleeping thread, that's only possible with
>> the help of the kernel.
>
> You keep returning to this in circles, forgetting that the argument
> isn't that help from the kernel isn't required.
>
> The argument is that there is no need to allocate a kernel
> object per mutex. That is only one point in the design space,
> and not a very good one.
>
> Do *you* have ADHD is the question.
>

It kind of seems that way, then I sometimes think Bonita is doing it on
purpose. Accusing me of trolling when I suggest using a race detector.
To be quite honest, I don't really trust Bonita's code at all. Then it
wants me to scour through its rather cryptic code and find all of the
bugs, for free. Strange.

Re: Thread-safe initialization of static objects

<fe50c473-df9e-4738-819b-56fd06540a4dn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++
X-Received: by 2002:a05:622a:1447:b0:419:4bf7:9783 with SMTP id v7-20020a05622a144700b004194bf79783mr95384qtx.5.1696102364211;
Sat, 30 Sep 2023 12:32:44 -0700 (PDT)
X-Received: by 2002:a4a:528e:0:b0:57b:6d64:b425 with SMTP id
d136-20020a4a528e000000b0057b6d64b425mr2686276oob.1.1696102363969; Sat, 30
Sep 2023 12:32:43 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.c++
Date: Sat, 30 Sep 2023 12:32:43 -0700 (PDT)
In-Reply-To: <20230930120011.66@kylheku.com>
Injection-Info: google-groups.googlegroups.com; posting-host=87.68.182.115; posting-account=ow8VOgoAAAAfiGNvoH__Y4ADRwQF1hZW
NNTP-Posting-Host: 87.68.182.115
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> <20230930120011.66@kylheku.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <fe50c473-df9e-4738-819b-56fd06540a4dn@googlegroups.com>
Subject: Re: Thread-safe initialization of static objects
From: already5chosen@yahoo.com (Michael S)
Injection-Date: Sat, 30 Sep 2023 19:32:44 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: Michael S - Sat, 30 Sep 2023 19:32 UTC

On Saturday, September 30, 2023 at 10:07:57 PM UTC+3, Kaz Kylheku wrote:
> On 2023-09-30, Bonita Montero <Bonita....@gmail.com> wrote:
> > Am 30.09.2023 um 05:57 schrieb Pavel:
> >> Bonita Montero wrote:
> >>> Am 29.09.2023 um 03:46 schrieb Pavel:
> >>>
> >>>> see my or Kaz's explanation for how it is done without allocating any
> >>>> kernel resource on either initialization or locking, either fast or
> >>>> slow path.
> >>>
> >>> ... on Linux with signals.
> >>>
> >> With user-space sync primitives on any system.
> >
> > A mutex may lead to a sleeping thread, that's only possible with
> > the help of the kernel.
> You keep returning to this in circles, forgetting that the argument
> isn't that help from the kernel isn't required.
>
> The argument is that there is no need to allocate a kernel
> object per mutex. That is only one point in the design space,
> and not a very good one.
>
> Do *you* have ADHD is the question.
> --
> TXR Programming Language: http://nongnu.org/txr
> Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
> Mastodon: @Kazi...@mstdn.ca
> NOTE: If you use Google Groups, I don't see you, unless you're whitelisted.

Another point is that "one user-mode lock per one local static object"
is also only one point in the design space. Possibly, not a bad point, if
you have user-mode lock as small as futex on Linux or or even as (slightly
bigger) SRW Lock on Windows's, but it seems that none of major C++ toolsets
had chosen this particular design point. I don't know why.

Re: Thread-safe initialization of static objects

<uf9u55$13ggj$1@dont-email.me>

  copy mid

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

  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, 30 Sep 2023 12:49:56 -0700
Organization: A noiseless patient Spider
Lines: 42
Message-ID: <uf9u55$13ggj$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> <20230930120011.66@kylheku.com>
<fe50c473-df9e-4738-819b-56fd06540a4dn@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 30 Sep 2023 19:49:57 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="3c13a05f8f36ad7f4d3864df47ab6ff2";
logging-data="1163795"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18L5tHEhY53HpjoGVVW68iztucbVcrt5qg="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.15.1
Cancel-Lock: sha1:CiOJse5AnIyh6CXejt3rClAV3RQ=
Content-Language: en-US
In-Reply-To: <fe50c473-df9e-4738-819b-56fd06540a4dn@googlegroups.com>
 by: Chris M. Thomasson - Sat, 30 Sep 2023 19:49 UTC

On 9/30/2023 12:32 PM, Michael S wrote:
> On Saturday, September 30, 2023 at 10:07:57 PM UTC+3, Kaz Kylheku wrote:
>> On 2023-09-30, Bonita Montero <Bonita....@gmail.com> wrote:
>>> Am 30.09.2023 um 05:57 schrieb Pavel:
>>>> Bonita Montero wrote:
>>>>> Am 29.09.2023 um 03:46 schrieb Pavel:
>>>>>
>>>>>> see my or Kaz's explanation for how it is done without allocating any
>>>>>> kernel resource on either initialization or locking, either fast or
>>>>>> slow path.
>>>>>
>>>>> ... on Linux with signals.
>>>>>
>>>> With user-space sync primitives on any system.
>>>
>>> A mutex may lead to a sleeping thread, that's only possible with
>>> the help of the kernel.
>> You keep returning to this in circles, forgetting that the argument
>> isn't that help from the kernel isn't required.
>>
>> The argument is that there is no need to allocate a kernel
>> object per mutex. That is only one point in the design space,
>> and not a very good one.
>>
>> Do *you* have ADHD is the question.
>> --
>> TXR Programming Language: http://nongnu.org/txr
>> Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
>> Mastodon: @Kazi...@mstdn.ca
>> NOTE: If you use Google Groups, I don't see you, unless you're whitelisted.
>
> Another point is that "one user-mode lock per one local static object"
> is also only one point in the design space. Possibly, not a bad point, if
> you have user-mode lock as small as futex on Linux or or even as (slightly
> bigger) SRW Lock on Windows's, but it seems that none of major C++ toolsets
> had chosen this particular design point. I don't know why.
>

Probably has something to with with an intra-process mutex failing on
lock even though the user code is 100% perfectly fine is just a really,
really bad idea. Bonita seems to really enjoy projecting its erroneous
ideas on others. Humm...

Re: Thread-safe initialization of static objects

<ufa061$13ggj$3@dont-email.me>

  copy mid

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

  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, 30 Sep 2023 13:24:32 -0700
Organization: A noiseless patient Spider
Lines: 51
Message-ID: <ufa061$13ggj$3@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> <20230930120011.66@kylheku.com>
<fe50c473-df9e-4738-819b-56fd06540a4dn@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 30 Sep 2023 20:24:33 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="3c13a05f8f36ad7f4d3864df47ab6ff2";
logging-data="1163795"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19RGQCdJ46taAUVp9ayR2bChrFIY5JRhps="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.15.1
Cancel-Lock: sha1:tgJL7RhGewr+gEFunoQii0a9xPE=
Content-Language: en-US
In-Reply-To: <fe50c473-df9e-4738-819b-56fd06540a4dn@googlegroups.com>
 by: Chris M. Thomasson - Sat, 30 Sep 2023 20:24 UTC

On 9/30/2023 12:32 PM, Michael S wrote:
> On Saturday, September 30, 2023 at 10:07:57 PM UTC+3, Kaz Kylheku wrote:
>> On 2023-09-30, Bonita Montero <Bonita....@gmail.com> wrote:
>>> Am 30.09.2023 um 05:57 schrieb Pavel:
>>>> Bonita Montero wrote:
>>>>> Am 29.09.2023 um 03:46 schrieb Pavel:
>>>>>
>>>>>> see my or Kaz's explanation for how it is done without allocating any
>>>>>> kernel resource on either initialization or locking, either fast or
>>>>>> slow path.
>>>>>
>>>>> ... on Linux with signals.
>>>>>
>>>> With user-space sync primitives on any system.
>>>
>>> A mutex may lead to a sleeping thread, that's only possible with
>>> the help of the kernel.
>> You keep returning to this in circles, forgetting that the argument
>> isn't that help from the kernel isn't required.
>>
>> The argument is that there is no need to allocate a kernel
>> object per mutex. That is only one point in the design space,
>> and not a very good one.
>>
>> Do *you* have ADHD is the question.
>> --
>> TXR Programming Language: http://nongnu.org/txr
>> Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
>> Mastodon: @Kazi...@mstdn.ca
>> NOTE: If you use Google Groups, I don't see you, unless you're whitelisted.
>
> Another point is that "one user-mode lock per one local static object"
> is also only one point in the design space. Possibly, not a bad point, if
> you have user-mode lock as small as futex on Linux or or even as (slightly
> bigger) SRW Lock on Windows's, but it seems that none of major C++ toolsets
> had chosen this particular design point. I don't know why.
>

Actually, one of my rw mutex algorithms allocates all of its kernel
resources up front wrt the object itself. So, the rwmutex can report
this condition wrt failure to create a kernel semaphore, in its
constructor, not on a damn lock() op wrt contention.

Fwiw, a person was kind enough to use my rwmutex work here: Notice it
has no loops? :^)

https://vorbrodt.blog/2019/02/14/read-write-mutex/
(check it out...)

Btw, I have modeled this using several race detectors even though I know
it works. :^)


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

Pages:123456789101112131415161718192021222324252627
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor