Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

"There is no distinctly American criminal class except Congress." -- Mark Twain


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

<uepvu9$1ff81$4@dont-email.me>

  copy mid

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

  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....@gmail.com (Chris M. Thomasson)
Newsgroups: comp.lang.c++
Subject: Re: Thread-safe initialization of static objects
Date: Sun, 24 Sep 2023 11:42:17 -0700
Organization: A noiseless patient Spider
Lines: 16
Message-ID: <uepvu9$1ff81$4@dont-email.me>
References: <udafjf$2joeq$1@dont-email.me> <zPGNM.14021$BMnd.11871@fx04.iad>
<ue7f6g$frod$2@dont-email.me> <LWINM.13017$ZkX3.12109@fx09.iad>
<ue8mn0$q534$4@dont-email.me> <uY5OM.30730$Yxl8.13078@fx14.iad>
<ueb3sb$2638l$6@dont-email.me> <ZjMOM.9398$EIy4.4982@fx48.iad>
<uegsia$3dj0r$2@dont-email.me> <fp7PM.104556$GHI6.80009@fx17.iad>
<uej631$3uji0$4@dont-email.me> <mzkPM.16155$ugs.3977@fx36.iad>
<uekler$bqj8$1@dont-email.me> <IsoPM.20139$wO91.15127@fx39.iad>
<uelqb1$lo9j$3@dont-email.me> <24DPM.126389$Hih7.28245@fx11.iad>
<uemvt2$rcgo$1@dont-email.me> <ueo915$16kh3$2@dont-email.me>
<ueoqra$19436$2@dont-email.me>
<aa307383-8415-4e39-9cca-18a0f57bf6f4n@googlegroups.com>
<uep6ss$1b36d$2@dont-email.me>
<01f149e4-8312-412a-a248-9c343f989c14n@googlegroups.com>
<uep831$1b9af$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 24 Sep 2023 18:42:18 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="4cc3e7dd6bc9b0456f53a6522e03ebcd";
logging-data="1555713"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18sv3bMPqRM92jd0E+VfAGkOVhH3W6FrMs="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.15.1
Cancel-Lock: sha1:MJfkh0NsdjazmhtopF7wDWPj63g=
Content-Language: en-US
In-Reply-To: <uep831$1b9af$1@dont-email.me>
 by: Chris M. Thomasson - Sun, 24 Sep 2023 18:42 UTC

On 9/24/2023 4:55 AM, Bonita Montero wrote:
> Am 24.09.2023 um 13:50 schrieb Michael S:
>
>> As to what is professional and what not, it's matter of opinion
>> and circumstances. ...
>
> The implementation can't estimate how long a static initialization
> takes. If it takes a longer time spinning would be a real problem.
> Yielding would also be not ok because the contenders may wait longer
> than necessary under load conditions or if not, may actually spin
> and consume unecessary power. So a semaphore is the only solution
> that makes sense.
>

You are all over the place. Sigh. Sorry, Bonita but you are fired from
the team.

Re: Thread-safe initialization of static objects

<ueq00g$1ff81$5@dont-email.me>

  copy mid

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

  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....@gmail.com (Chris M. Thomasson)
Newsgroups: comp.lang.c++
Subject: Re: Thread-safe initialization of static objects
Date: Sun, 24 Sep 2023 11:43:28 -0700
Organization: A noiseless patient Spider
Lines: 73
Message-ID: <ueq00g$1ff81$5@dont-email.me>
References: <udafjf$2joeq$1@dont-email.me> <udqbg3$1mdv6$1@dont-email.me>
<udqq8u$1p3q6$1@dont-email.me> <uds0qa$22qfj$1@dont-email.me>
<udtg9s$2aqb5$1@dont-email.me> <uduimg$2imqi$1@dont-email.me>
<FUEMM.7469$ZkX3.6739@fx09.iad> <ue3bhh$3l4s1$1@dont-email.me>
<ue3nga$3ms5s$1@dont-email.me> <eohNM.4832$3lL1.1360@fx47.iad>
<ue4cqe$3rjfr$1@dont-email.me> <LwlNM.50924$QShe.20423@fx11.iad>
<ue4p5v$3truj$1@dont-email.me> <EjoNM.17221$DXgc.9861@fx36.iad>
<ue5tfc$7pns$1@dont-email.me> <zPGNM.14021$BMnd.11871@fx04.iad>
<ue7f6g$frod$2@dont-email.me> <LWINM.13017$ZkX3.12109@fx09.iad>
<ue8mn0$q534$4@dont-email.me> <uY5OM.30730$Yxl8.13078@fx14.iad>
<ueb3sb$2638l$6@dont-email.me> <ZjMOM.9398$EIy4.4982@fx48.iad>
<uegsia$3dj0r$2@dont-email.me> <fp7PM.104556$GHI6.80009@fx17.iad>
<uej631$3uji0$4@dont-email.me> <VnsPM.122464$Hih7.52058@fx11.iad>
<uelqeq$lo9j$4@dont-email.me> <XbJPM.157838$Hih7.40116@fx11.iad>
<ueo5ea$162e7$1@dont-email.me> <3XZPM.179439$vMO8.93801@fx16.iad>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 24 Sep 2023 18:43:29 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="4cc3e7dd6bc9b0456f53a6522e03ebcd";
logging-data="1555713"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19zhuNfEPqGN66XAoYjWelyY3XDiIGauGg="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.15.1
Cancel-Lock: sha1:jOu2tT54muBe+HMrIYAj6em52Jk=
Content-Language: en-US
In-Reply-To: <3XZPM.179439$vMO8.93801@fx16.iad>
 by: Chris M. Thomasson - Sun, 24 Sep 2023 18:43 UTC

On 9/24/2023 10:00 AM, Pavel wrote:
> Chris M. Thomasson wrote:
>> On 9/23/2023 2:58 PM, Pavel wrote:
>>> Bonita Montero wrote:
>>>> Am 23.09.2023 um 04:50 schrieb Pavel:
>>>>
>>>>> for some mutex it may fail, for some not. C++ standard never says
>>>>> that std::mutex can fail. ...
>>>>
>>>> std::mutex::lock() can throw a system_error.
>>> Wrong. The standard says that lock can throw while discussing general
>>> requirements for all types of mutices (mutex, recursive_mutex,
>>> timed_mutex, recursive_timed_mutex, shared_mutex, and
>>> shared_timed_mutex). Then, when discussing specific mutices, the
>>> standard says that recursive_mutex, recursive_timed_mutex and any of
>>> the shared mutices can throw system_error). About std::mutex the
>>> standard says no such thing.
>>>
>>> The only mentioning of an error for std::mutex is in a non-normative
>>> note that explains: "If the
>>> implementation can detect the deadlock, a
>>> resource_deadlock_would_occur error condition might be observed". We
>>> knew that already (using deadlock-detecting mutex is asking for
>>> error) -- as well as that no C++ implementer would use a more complex
>>> error-throwing deadlock-detecting mutex given a simpler alternative
>>> for static initialization.
>>>
>>> In particular, on UNIX, an implementer will use
>>> PTHREAD_MUTEX_INITIALIZER that initializes a non-ERRORCHECK mutex.
>>>
>>> On Windows, critical section is essentially a recursive
>>> deadlock-detecting (timed) mutex so it is relatively expensive and
>>> can fail.
>>>
>>> All it means that, on Windows, to implement static initialization, a
>>> C++ implementor has to use other primitives, most conveniently --
>>> InitOnceExecuteOnce -- that cannot fail unless the callback it
>>> executes fails.
>>>
>>>>
>>>>> "delayed" or "deferred" initialization of synchronization
>>>>> primitives that can be used to initialize static C++ object is
>>>>> entirely your fantasy. It cannot be used for this purpose, period.
>>>>
>>>> The mutex' constructor doesn't throw, so there must be delayed
>>>> initialization.
>>> Wrong. a mutex can be created during static initialization entirely
>>> in user space (like POSIX mutex on linux is created)
>>>
>>>> But as we've seen recently pthread Mutexes also
>>>> allow delayed initialization
>>> "Allow" does not mean C++ static initialization implementer has to
>>> use it. On Linux, mutex_lock tries light-weight user-space
>>> initialization internally so no need to reinvent that wheel for
>>> implementers. But of course on Linux any reasonable implementer will
>>> use pthread_once (which also does not have any delayed
>>> iniitialization), rather than a mutex.
>>>
>>>>  of the slow path and Win32 always
>>>> does the same.
>>> Yes, on Win32 C++ static initialization does not have to use mutex
>>> either. INIT_ONCE can be initialized statically to
>>> INIT_ONCE_STATIC_INIT -- which is all one needs for static
>>> initialization (coincidentally, on Win32 specifically
>>> InitOnceInitialize does not fail either but this is irrelevant to the
>>> issue of static C++ initialization).
>>
>> Iirc, I think a windows critical section might raise an error if its
>> been waiting for 30 days or something, deadlocked.
> Exactly, that's what I meant, just cited in the other response. It is,
> by behavior, a timed recursive mutex but user does not control the time.

Well, in that sense, okay. I see what you are getting at. :^)

Re: Thread-safe initialization of static objects

<ueq056$1fihu$1@dont-email.me>

  copy mid

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

  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....@gmail.com (Chris M. Thomasson)
Newsgroups: comp.lang.c++
Subject: Re: Thread-safe initialization of static objects
Date: Sun, 24 Sep 2023 11:45:57 -0700
Organization: A noiseless patient Spider
Lines: 53
Message-ID: <ueq056$1fihu$1@dont-email.me>
References: <udafjf$2joeq$1@dont-email.me> <udqbg3$1mdv6$1@dont-email.me>
<udqq8u$1p3q6$1@dont-email.me> <uds0qa$22qfj$1@dont-email.me>
<udtg9s$2aqb5$1@dont-email.me> <uduimg$2imqi$1@dont-email.me>
<FUEMM.7469$ZkX3.6739@fx09.iad> <ue3bhh$3l4s1$1@dont-email.me>
<ue3nga$3ms5s$1@dont-email.me> <eohNM.4832$3lL1.1360@fx47.iad>
<ue4cqe$3rjfr$1@dont-email.me> <LwlNM.50924$QShe.20423@fx11.iad>
<ue4p5v$3truj$1@dont-email.me> <EjoNM.17221$DXgc.9861@fx36.iad>
<ue5tfc$7pns$1@dont-email.me> <zPGNM.14021$BMnd.11871@fx04.iad>
<ue7f6g$frod$2@dont-email.me> <LWINM.13017$ZkX3.12109@fx09.iad>
<ue8mn0$q534$4@dont-email.me> <uY5OM.30730$Yxl8.13078@fx14.iad>
<ueb3sb$2638l$6@dont-email.me> <ZjMOM.9398$EIy4.4982@fx48.iad>
<uegsia$3dj0r$2@dont-email.me> <fp7PM.104556$GHI6.80009@fx17.iad>
<uej631$3uji0$4@dont-email.me> <VnsPM.122464$Hih7.52058@fx11.iad>
<uelqeq$lo9j$4@dont-email.me> <XbJPM.157838$Hih7.40116@fx11.iad>
<ueo57s$15ub1$1@dont-email.me> <RVZPM.179438$vMO8.73136@fx16.iad>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 24 Sep 2023 18:45:58 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="4cc3e7dd6bc9b0456f53a6522e03ebcd";
logging-data="1559102"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19wh+RU0p/jrwfzv15g8q0+Fy8nzpnBIzY="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.15.1
Cancel-Lock: sha1:AdBxFZ36lSc5uSy9EndnQUqeu7A=
In-Reply-To: <RVZPM.179438$vMO8.73136@fx16.iad>
Content-Language: en-US
 by: Chris M. Thomasson - Sun, 24 Sep 2023 18:45 UTC

On 9/24/2023 9:59 AM, Pavel wrote:
> Chris M. Thomasson wrote:
>> On 9/23/2023 2:58 PM, Pavel wrote:
>>> Bonita Montero wrote:
>>>> Am 23.09.2023 um 04:50 schrieb Pavel:
>>>>
>>>>> for some mutex it may fail, for some not. C++ standard never says
>>>>> that std::mutex can fail. ...
>>>>
>>>> std::mutex::lock() can throw a system_error.
>>> Wrong. The standard says that lock can throw while discussing general
>>> requirements for all types of mutices (mutex, recursive_mutex,
>>> timed_mutex, recursive_timed_mutex, shared_mutex, and
>>> shared_timed_mutex). Then, when discussing specific mutices, the
>>> standard says that recursive_mutex, recursive_timed_mutex and any of
>>> the shared mutices can throw system_error). About std::mutex the
>>> standard says no such thing.
>>>
>>> The only mentioning of an error for std::mutex is in a non-normative
>>> note that explains: "If the
>>> implementation can detect the deadlock, a
>>> resource_deadlock_would_occur error condition might be observed". We
>>> knew that already (using deadlock-detecting mutex is asking for
>>> error) -- as well as that no C++ implementer would use a more complex
>>> error-throwing deadlock-detecting mutex given a simpler alternative
>>> for static initialization.
>>>
>>> In particular, on UNIX, an implementer will use
>>> PTHREAD_MUTEX_INITIALIZER that initializes a non-ERRORCHECK mutex.
>>>
>>> On Windows, critical section is essentially a recursive
>>> deadlock-detecting (timed) mutex so it is relatively expensive and
>>> can fail.
>> [...]
>>
>> I don't think there is a timed wait for a windows critical section. I
>> know it has a try, but I cannot remember a timed wait...
> It is not a timed wait controlled by the user. But it waits for some
> time (specified in the registry) and then fails -- that is its way to
> *try* to detect a deadlock. Says the doc on EnterCriticalSection:
>
> "
> This function can raise EXCEPTION_POSSIBLE_DEADLOCK, also known as
> STATUS_POSSIBLE_DEADLOCK, if a wait operation on the critical section
> times out. The timeout interval is specified by the following registry
> value: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session
> Manager\CriticalSectionTimeout. Do not handle a possible deadlock
> exception; instead, debug the application.
> "

Thanks for your clarification. No problem. :^)

Re: Thread-safe initialization of static objects

<ueq0bm$1fihu$2@dont-email.me>

  copy mid

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

  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....@gmail.com (Chris M. Thomasson)
Newsgroups: comp.lang.c++
Subject: Re: Thread-safe initialization of static objects
Date: Sun, 24 Sep 2023 11:49:26 -0700
Organization: A noiseless patient Spider
Lines: 34
Message-ID: <ueq0bm$1fihu$2@dont-email.me>
References: <udafjf$2joeq$1@dont-email.me> <zPGNM.14021$BMnd.11871@fx04.iad>
<ue7f6g$frod$2@dont-email.me> <LWINM.13017$ZkX3.12109@fx09.iad>
<ue8mn0$q534$4@dont-email.me> <uY5OM.30730$Yxl8.13078@fx14.iad>
<ueb3sb$2638l$6@dont-email.me> <ZjMOM.9398$EIy4.4982@fx48.iad>
<uegsia$3dj0r$2@dont-email.me> <fp7PM.104556$GHI6.80009@fx17.iad>
<uej631$3uji0$4@dont-email.me> <mzkPM.16155$ugs.3977@fx36.iad>
<uekler$bqj8$1@dont-email.me> <IsoPM.20139$wO91.15127@fx39.iad>
<uelqb1$lo9j$3@dont-email.me> <24DPM.126389$Hih7.28245@fx11.iad>
<uemvt2$rcgo$1@dont-email.me> <ueo915$16kh3$2@dont-email.me>
<ueoqra$19436$2@dont-email.me>
<37dbe3b6-ead0-487b-884c-197124888eben@googlegroups.com>
<uepvs7$1ff81$3@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 24 Sep 2023 18:49:26 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="4cc3e7dd6bc9b0456f53a6522e03ebcd";
logging-data="1559102"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/pkkrtkIM2k3UeVrT9r6pDcyGtKS8Rx98="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.15.1
Cancel-Lock: sha1:5epr0qUSp2weXDln/Svx6R7NTNk=
Content-Language: en-US
In-Reply-To: <uepvs7$1ff81$3@dont-email.me>
 by: Chris M. Thomasson - Sun, 24 Sep 2023 18:49 UTC

On 9/24/2023 11:41 AM, Chris M. Thomasson wrote:
> On 9/24/2023 2:50 AM, Michael S wrote:
>> On Sunday, September 24, 2023 at 11:09:31 AM UTC+3, Bonita Montero wrote:
>>> Am 24.09.2023 um 05:05 schrieb Chris M. Thomasson:
>>>
>>>> Why do you think that static initialization must use a std::mutex
>>>> anyway? ...
>>>
>>> Call it std::mutex or whatever. It is mandated that contenders
>>> are sleeping - that's not possible without sth. else than a mutex.
>>
>> Few dozens posts above I demonstrated an implementation
>> for pre-Vista Windows where contenders are sleeping just fine and
>> waking just fine and initialization of different objects proceeds
>> simultaneously just fine.  And it does not use mutex for that.
>> It uses SleepEx() for wait and QueueUserApc() for wakeup.
>
> Why? APC's open up a big can of worms.

Oh shit. I am starting to remember some nightmare code I had to debug
many moon ago that used async cancellation in POSIX threads.

>
>
>> It uses one global mutex (in form of critical section) for a short
>> while for metadata updates, but that's done for simplicity and
>> practicality rather than out of necessity. I am pretty sure that
>> with enough effort I can device a variant that achieves the same
>> with CaS.
>
>

Re: Thread-safe initialization of static objects

<ueq0e2$1fihu$3@dont-email.me>

  copy mid

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

  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....@gmail.com (Chris M. Thomasson)
Newsgroups: comp.lang.c++
Subject: Re: Thread-safe initialization of static objects
Date: Sun, 24 Sep 2023 11:50:42 -0700
Organization: A noiseless patient Spider
Lines: 16
Message-ID: <ueq0e2$1fihu$3@dont-email.me>
References: <udafjf$2joeq$1@dont-email.me> <zPGNM.14021$BMnd.11871@fx04.iad>
<ue7f6g$frod$2@dont-email.me> <LWINM.13017$ZkX3.12109@fx09.iad>
<ue8mn0$q534$4@dont-email.me> <uY5OM.30730$Yxl8.13078@fx14.iad>
<ueb3sb$2638l$6@dont-email.me> <ZjMOM.9398$EIy4.4982@fx48.iad>
<uegsia$3dj0r$2@dont-email.me> <fp7PM.104556$GHI6.80009@fx17.iad>
<uej631$3uji0$4@dont-email.me> <mzkPM.16155$ugs.3977@fx36.iad>
<uekler$bqj8$1@dont-email.me> <IsoPM.20139$wO91.15127@fx39.iad>
<uelqb1$lo9j$3@dont-email.me> <24DPM.126389$Hih7.28245@fx11.iad>
<uemvt2$rcgo$1@dont-email.me> <ueo915$16kh3$2@dont-email.me>
<ueoqra$19436$2@dont-email.me>
<aa307383-8415-4e39-9cca-18a0f57bf6f4n@googlegroups.com>
<uep6ss$1b36d$2@dont-email.me> <YAVPM.165857$Hih7.40004@fx11.iad>
<uep94g$1bect$2@dont-email.me>
<e8fd5306-78bb-4e6b-b2a3-51060be3ad9fn@googlegroups.com>
<uepaeh$1blsi$1@dont-email.me>
<7fae3a03-f568-4482-88a6-ffd93cb87524n@googlegroups.com>
<uepbda$1brdd$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 24 Sep 2023 18:50:42 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="4cc3e7dd6bc9b0456f53a6522e03ebcd";
logging-data="1559102"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/sF/MS4MuNCYkrZuPvVnPTgml8s4otb2Q="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.15.1
Cancel-Lock: sha1:TEye0/a82SmH6LcKYth184bhDsA=
In-Reply-To: <uepbda$1brdd$1@dont-email.me>
Content-Language: en-US
 by: Chris M. Thomasson - Sun, 24 Sep 2023 18:50 UTC

On 9/24/2023 5:51 AM, Bonita Montero wrote:
> Am 24.09.2023 um 14:47 schrieb Michael S:
>
>> I don't say that is what should be done.
>> For me, calling abort() with as intelligible as practical error
>> message is
>> what should be done on hosted implementation.
>
> I _sometimes_ call terminate() on synchronization errors also, f.e. when
> a threads responds back to a thread which issued a task to this thread
> to prevent starving the other thread. But with the issuing thread first
> I don't terminate(). It simply depends on the situation and with static
> initialization it's the same.
>

Oh my god.

Re: Thread-safe initialization of static objects

<ueq1f4$1fpsb$1@dont-email.me>

  copy mid

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

  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....@gmail.com (Chris M. Thomasson)
Newsgroups: comp.lang.c++
Subject: Re: Thread-safe initialization of static objects
Date: Sun, 24 Sep 2023 12:08:20 -0700
Organization: A noiseless patient Spider
Lines: 39
Message-ID: <ueq1f4$1fpsb$1@dont-email.me>
References: <udafjf$2joeq$1@dont-email.me> <zPGNM.14021$BMnd.11871@fx04.iad>
<ue7f6g$frod$2@dont-email.me> <LWINM.13017$ZkX3.12109@fx09.iad>
<ue8mn0$q534$4@dont-email.me> <uY5OM.30730$Yxl8.13078@fx14.iad>
<ueb3sb$2638l$6@dont-email.me> <ZjMOM.9398$EIy4.4982@fx48.iad>
<uegsia$3dj0r$2@dont-email.me> <fp7PM.104556$GHI6.80009@fx17.iad>
<uej631$3uji0$4@dont-email.me> <mzkPM.16155$ugs.3977@fx36.iad>
<uekler$bqj8$1@dont-email.me> <IsoPM.20139$wO91.15127@fx39.iad>
<uelqb1$lo9j$3@dont-email.me> <24DPM.126389$Hih7.28245@fx11.iad>
<uemvt2$rcgo$1@dont-email.me> <ueo915$16kh3$2@dont-email.me>
<ueoqra$19436$2@dont-email.me>
<37dbe3b6-ead0-487b-884c-197124888eben@googlegroups.com>
<uepvs7$1ff81$3@dont-email.me> <ueq0bm$1fihu$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 24 Sep 2023 19:08:21 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="4cc3e7dd6bc9b0456f53a6522e03ebcd";
logging-data="1566603"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18tIPqU44ins1hsqvTqS1Fre12/uaX/eo4="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.15.1
Cancel-Lock: sha1:Dkr4jHmUhGeTApE+QrcxvRzLSLk=
Content-Language: en-US
In-Reply-To: <ueq0bm$1fihu$2@dont-email.me>
 by: Chris M. Thomasson - Sun, 24 Sep 2023 19:08 UTC

On 9/24/2023 11:49 AM, Chris M. Thomasson wrote:
> On 9/24/2023 11:41 AM, Chris M. Thomasson wrote:
>> On 9/24/2023 2:50 AM, Michael S wrote:
>>> On Sunday, September 24, 2023 at 11:09:31 AM UTC+3, Bonita Montero
>>> wrote:
>>>> Am 24.09.2023 um 05:05 schrieb Chris M. Thomasson:
>>>>
>>>>> Why do you think that static initialization must use a std::mutex
>>>>> anyway? ...
>>>>
>>>> Call it std::mutex or whatever. It is mandated that contenders
>>>> are sleeping - that's not possible without sth. else than a mutex.
>>>
>>> Few dozens posts above I demonstrated an implementation
>>> for pre-Vista Windows where contenders are sleeping just fine and
>>> waking just fine and initialization of different objects proceeds
>>> simultaneously just fine.  And it does not use mutex for that.
>>> It uses SleepEx() for wait and QueueUserApc() for wakeup.
>>
>> Why? APC's open up a big can of worms.
>
> Oh shit. I am starting to remember some nightmare code I had to debug
> many moon ago that used async cancellation in POSIX threads.
>
>
>
>>
>>
>>> It uses one global mutex (in form of critical section) for a short
>>> while for metadata updates, but that's done for simplicity and
>>> practicality rather than out of necessity. I am pretty sure that
>>> with enough effort I can device a variant that achieves the same
>>> with CaS.
>>
>>
>

Now, I am recalling async safe sync objects that must be used in a
signal handler for some reason.

Re: Thread-safe initialization of static objects

<ueq94l$1h06t$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: jameskuy...@alumni.caltech.edu (James Kuyper)
Newsgroups: comp.lang.c++
Subject: Re: Thread-safe initialization of static objects
Date: Sun, 24 Sep 2023 17:19:16 -0400
Organization: A noiseless patient Spider
Lines: 22
Message-ID: <ueq94l$1h06t$1@dont-email.me>
References: <udafjf$2joeq$1@dont-email.me> <zPGNM.14021$BMnd.11871@fx04.iad>
<ue7f6g$frod$2@dont-email.me> <LWINM.13017$ZkX3.12109@fx09.iad>
<ue8mn0$q534$4@dont-email.me> <uY5OM.30730$Yxl8.13078@fx14.iad>
<ueb3sb$2638l$6@dont-email.me> <ZjMOM.9398$EIy4.4982@fx48.iad>
<uegsia$3dj0r$2@dont-email.me> <fp7PM.104556$GHI6.80009@fx17.iad>
<uej631$3uji0$4@dont-email.me> <mzkPM.16155$ugs.3977@fx36.iad>
<uekler$bqj8$1@dont-email.me> <IsoPM.20139$wO91.15127@fx39.iad>
<uelqb1$lo9j$3@dont-email.me> <24DPM.126389$Hih7.28245@fx11.iad>
<uemvt2$rcgo$1@dont-email.me> <ueo915$16kh3$2@dont-email.me>
<ueoqra$19436$2@dont-email.me>
<aa307383-8415-4e39-9cca-18a0f57bf6f4n@googlegroups.com>
<uep6ss$1b36d$2@dont-email.me> <YAVPM.165857$Hih7.40004@fx11.iad>
<02a76ac9-ef3d-e3e8-92cb-7b071e2a3f44@alumni.caltech.edu>
<8a0dd2ff-e4c9-4dd4-815e-04a0c43bf696@Damon-Family.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 24 Sep 2023 21:19:17 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="02f9defeecc8712da321e422f8c6bcdf";
logging-data="1605853"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+jITXAdl42QFi0OI2dBkHg4bmH/UW4ZIs="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.15.1
Cancel-Lock: sha1:rtX8ZcOUQkC2dkBR3mmOJljHoR0=
Content-Language: en-US
In-Reply-To: <8a0dd2ff-e4c9-4dd4-815e-04a0c43bf696@Damon-Family.org>
 by: James Kuyper - Sun, 24 Sep 2023 21:19 UTC

On 9/24/23 14:17, Richard Damon wrote:
> On 9/24/23 12:17 PM, James Kuyper wrote:
>> On 9/24/23 08:04, Richard Damon wrote:
>>
....
>>> Demanding that specification change because YOU don't see how to meet
>>> them is very much "unprofessional"
>> No, it is very professional to complain about specifications that can't
>> be met. What is unprofessional is incorrectly concluding that they
>> cannot be met (especially after having had it explained to you many times).
> Note the emphasis on the word YOU.
>
> The fact THEY don't see how to do it, even after it has been
> demonstrated that it CAN be done, is what is unprofessional.
>
The problem is that Bonita has not recognized those demonstrations as
valid and relevant. That might be because she's misunderstood the
situation (which would be my guess), it might be because she's right, it
might be because you all have explained things to her poorly. However,
unless and until she's been convinced that the specification can be met,
it's entirely appropriate for her to complain about the "fact" that it
can't.

Re: Thread-safe initialization of static objects

<ueq9sl$1h4qe$1@dont-email.me>

  copy mid

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

  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....@gmail.com (Chris M. Thomasson)
Newsgroups: comp.lang.c++
Subject: Re: Thread-safe initialization of static objects
Date: Sun, 24 Sep 2023 14:32:04 -0700
Organization: A noiseless patient Spider
Lines: 27
Message-ID: <ueq9sl$1h4qe$1@dont-email.me>
References: <udafjf$2joeq$1@dont-email.me> <zPGNM.14021$BMnd.11871@fx04.iad>
<ue7f6g$frod$2@dont-email.me> <LWINM.13017$ZkX3.12109@fx09.iad>
<ue8mn0$q534$4@dont-email.me> <uY5OM.30730$Yxl8.13078@fx14.iad>
<ueb3sb$2638l$6@dont-email.me> <ZjMOM.9398$EIy4.4982@fx48.iad>
<uegsia$3dj0r$2@dont-email.me> <fp7PM.104556$GHI6.80009@fx17.iad>
<uej631$3uji0$4@dont-email.me> <mzkPM.16155$ugs.3977@fx36.iad>
<uekler$bqj8$1@dont-email.me> <IsoPM.20139$wO91.15127@fx39.iad>
<uelqb1$lo9j$3@dont-email.me> <24DPM.126389$Hih7.28245@fx11.iad>
<uemvt2$rcgo$1@dont-email.me> <ueo915$16kh3$2@dont-email.me>
<ueoqra$19436$2@dont-email.me>
<aa307383-8415-4e39-9cca-18a0f57bf6f4n@googlegroups.com>
<uep6ss$1b36d$2@dont-email.me> <YAVPM.165857$Hih7.40004@fx11.iad>
<02a76ac9-ef3d-e3e8-92cb-7b071e2a3f44@alumni.caltech.edu>
<8a0dd2ff-e4c9-4dd4-815e-04a0c43bf696@Damon-Family.org>
<ueq94l$1h06t$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 24 Sep 2023 21:32:05 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="4cc3e7dd6bc9b0456f53a6522e03ebcd";
logging-data="1610574"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+5sbrTrISWjpP4e4y+lpXS3DeZjCN7WaM="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.15.1
Cancel-Lock: sha1:IpR//SwiwIjqokH4wqPYbojS8Is=
Content-Language: en-US
In-Reply-To: <ueq94l$1h06t$1@dont-email.me>
 by: Chris M. Thomasson - Sun, 24 Sep 2023 21:32 UTC

On 9/24/2023 2:19 PM, James Kuyper wrote:
> On 9/24/23 14:17, Richard Damon wrote:
>> On 9/24/23 12:17 PM, James Kuyper wrote:
>>> On 9/24/23 08:04, Richard Damon wrote:
>>>
> ...
>>>> Demanding that specification change because YOU don't see how to meet
>>>> them is very much "unprofessional"
>>> No, it is very professional to complain about specifications that can't
>>> be met. What is unprofessional is incorrectly concluding that they
>>> cannot be met (especially after having had it explained to you many times).
>> Note the emphasis on the word YOU.
>>
>> The fact THEY don't see how to do it, even after it has been
>> demonstrated that it CAN be done, is what is unprofessional.
>>
> The problem is that Bonita has not recognized those demonstrations as
> valid and relevant. That might be because she's misunderstood the
> situation (which would be my guess), it might be because she's right, it
> might be because you all have explained things to her poorly. However,
> unless and until she's been convinced that the specification can be met,
> it's entirely appropriate for her to complain about the "fact" that it
> can't.

A mutex that has to jump through atomic hoops during a contended lock
with any "delayed" resource allocation from the kernel is a no go. Bad
design, no good at all.

Re: Thread-safe initialization of static objects

<ac3QM.21195$C_lf.20631@fx33.iad>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!news.1d4.us!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx33.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> <zPGNM.14021$BMnd.11871@fx04.iad>
<ue7f6g$frod$2@dont-email.me> <LWINM.13017$ZkX3.12109@fx09.iad>
<ue8mn0$q534$4@dont-email.me> <uY5OM.30730$Yxl8.13078@fx14.iad>
<ueb3sb$2638l$6@dont-email.me> <ZjMOM.9398$EIy4.4982@fx48.iad>
<uegsia$3dj0r$2@dont-email.me> <fp7PM.104556$GHI6.80009@fx17.iad>
<uej631$3uji0$4@dont-email.me> <mzkPM.16155$ugs.3977@fx36.iad>
<uekler$bqj8$1@dont-email.me> <IsoPM.20139$wO91.15127@fx39.iad>
<uelqb1$lo9j$3@dont-email.me> <24DPM.126389$Hih7.28245@fx11.iad>
<uemvt2$rcgo$1@dont-email.me> <ueo915$16kh3$2@dont-email.me>
<ueoqra$19436$2@dont-email.me>
<aa307383-8415-4e39-9cca-18a0f57bf6f4n@googlegroups.com>
<uep6ss$1b36d$2@dont-email.me> <YAVPM.165857$Hih7.40004@fx11.iad>
<02a76ac9-ef3d-e3e8-92cb-7b071e2a3f44@alumni.caltech.edu>
<8a0dd2ff-e4c9-4dd4-815e-04a0c43bf696@Damon-Family.org>
<ueq94l$1h06t$1@dont-email.me>
From: Rich...@Damon-Family.org (Richard Damon)
Content-Language: en-US
In-Reply-To: <ueq94l$1h06t$1@dont-email.me>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 33
Message-ID: <ac3QM.21195$C_lf.20631@fx33.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: Sun, 24 Sep 2023 19:00:22 -0400
X-Received-Bytes: 3202
 by: Richard Damon - Sun, 24 Sep 2023 23:00 UTC

On 9/24/23 5:19 PM, James Kuyper wrote:
> On 9/24/23 14:17, Richard Damon wrote:
>> On 9/24/23 12:17 PM, James Kuyper wrote:
>>> On 9/24/23 08:04, Richard Damon wrote:
>>>
> ...
>>>> Demanding that specification change because YOU don't see how to meet
>>>> them is very much "unprofessional"
>>> No, it is very professional to complain about specifications that can't
>>> be met. What is unprofessional is incorrectly concluding that they
>>> cannot be met (especially after having had it explained to you many times).
>> Note the emphasis on the word YOU.
>>
>> The fact THEY don't see how to do it, even after it has been
>> demonstrated that it CAN be done, is what is unprofessional.
>>
> The problem is that Bonita has not recognized those demonstrations as
> valid and relevant. That might be because she's misunderstood the
> situation (which would be my guess), it might be because she's right, it
> might be because you all have explained things to her poorly. However,
> unless and until she's been convinced that the specification can be met,
> it's entirely appropriate for her to complain about the "fact" that it
> can't.

Refusing to accept Truth just puts her in the same league as Peter
Olcott and Flat Earthers. Someone asserting that something that has been
demonstrated isn't true has the burden of proof to actually show their
claim.

We have implementations that fully claim to be compliant in this, and
zero cases even hinting that they are in this aspect.

Arguing about it is the same as arguing about Russel's Teapot.

Re: Thread-safe initialization of static objects

<ueqfec$1i6un$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Bonita.M...@gmail.com (Bonita Montero)
Newsgroups: comp.lang.c++
Subject: Re: Thread-safe initialization of static objects
Date: Mon, 25 Sep 2023 01:06:52 +0200
Organization: A noiseless patient Spider
Lines: 8
Message-ID: <ueqfec$1i6un$1@dont-email.me>
References: <udafjf$2joeq$1@dont-email.me> <udqbg3$1mdv6$1@dont-email.me>
<udqq8u$1p3q6$1@dont-email.me> <uds0qa$22qfj$1@dont-email.me>
<udtg9s$2aqb5$1@dont-email.me> <uduimg$2imqi$1@dont-email.me>
<FUEMM.7469$ZkX3.6739@fx09.iad> <ue3bhh$3l4s1$1@dont-email.me>
<ue3nga$3ms5s$1@dont-email.me> <eohNM.4832$3lL1.1360@fx47.iad>
<ue4cqe$3rjfr$1@dont-email.me> <LwlNM.50924$QShe.20423@fx11.iad>
<ue4p5v$3truj$1@dont-email.me> <EjoNM.17221$DXgc.9861@fx36.iad>
<ue5tfc$7pns$1@dont-email.me> <zPGNM.14021$BMnd.11871@fx04.iad>
<ue7f6g$frod$2@dont-email.me> <LWINM.13017$ZkX3.12109@fx09.iad>
<ue8mn0$q534$4@dont-email.me> <uY5OM.30730$Yxl8.13078@fx14.iad>
<ueb3sb$2638l$6@dont-email.me> <ZjMOM.9398$EIy4.4982@fx48.iad>
<uegsia$3dj0r$2@dont-email.me> <fp7PM.104556$GHI6.80009@fx17.iad>
<uej631$3uji0$4@dont-email.me> <VnsPM.122464$Hih7.52058@fx11.iad>
<uelqeq$lo9j$4@dont-email.me> <XbJPM.157838$Hih7.40116@fx11.iad>
<ueo5ps$163k0$1@dont-email.me> <Y3_PM.16749$E_d1.14707@fx04.iad>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 24 Sep 2023 23:06:52 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="e2ba2e234a6dcf9f0afcd3d90854525d";
logging-data="1645527"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/8OXGtgvcp+fK2IedsuXw0GUGMrtAV790="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:RlFmfqfIl2C9jEzgnxyIIhXe0cM=
Content-Language: de-DE
In-Reply-To: <Y3_PM.16749$E_d1.14707@fx04.iad>
 by: Bonita Montero - Sun, 24 Sep 2023 23:06 UTC

Am 24.09.2023 um 19:10 schrieb Pavel:

> so? everyone has been telling you initialization of simple mutices
> does not fail. After few hundred posts, you decided to agree?

lock() and unlock() might throw system_error.

Re: Thread-safe initialization of static objects

<ueqfkl$1i6un$2@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Bonita.M...@gmail.com (Bonita Montero)
Newsgroups: comp.lang.c++
Subject: Re: Thread-safe initialization of static objects
Date: Mon, 25 Sep 2023 01:10:13 +0200
Organization: A noiseless patient Spider
Lines: 9
Message-ID: <ueqfkl$1i6un$2@dont-email.me>
References: <udafjf$2joeq$1@dont-email.me> <LwlNM.50924$QShe.20423@fx11.iad>
<ue4p5v$3truj$1@dont-email.me> <EjoNM.17221$DXgc.9861@fx36.iad>
<ue5tfc$7pns$1@dont-email.me> <zPGNM.14021$BMnd.11871@fx04.iad>
<ue7f6g$frod$2@dont-email.me> <LWINM.13017$ZkX3.12109@fx09.iad>
<ue8mn0$q534$4@dont-email.me> <uY5OM.30730$Yxl8.13078@fx14.iad>
<ueb3sb$2638l$6@dont-email.me> <ZjMOM.9398$EIy4.4982@fx48.iad>
<uegsia$3dj0r$2@dont-email.me> <fp7PM.104556$GHI6.80009@fx17.iad>
<uej631$3uji0$4@dont-email.me> <mzkPM.16155$ugs.3977@fx36.iad>
<uekler$bqj8$1@dont-email.me> <20230922111441.730@kylheku.com>
<uelq9h$lo9j$2@dont-email.me> <20230923041951.728@kylheku.com>
<uemlbj$pl2d$1@dont-email.me> <20230923185708.811@kylheku.com>
<ueoqpa$19436$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>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 24 Sep 2023 23:10:13 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="e2ba2e234a6dcf9f0afcd3d90854525d";
logging-data="1645527"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19gnGkszsob1sxz3nWvH0sKCQRyhPfEm/Q="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:MTCX2OjMdEcN6FViXW3FkQrsciQ=
Content-Language: de-DE
In-Reply-To: <PKZPM.232647$ZXz4.71820@fx18.iad>
 by: Bonita Montero - Sun, 24 Sep 2023 23:10 UTC

Am 24.09.2023 um 18:47 schrieb Pavel:
> Bonita Montero wrote:

> Name one platform for which it is not guaranteed and that targets a
> compliant C++11+ implementation.

Any platform since lock() and unlock() might throw system_error()
as documented.

Re: Thread-safe initialization of static objects

<ueqh4n$1ienq$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: jameskuy...@alumni.caltech.edu (James Kuyper)
Newsgroups: comp.lang.c++
Subject: Re: Thread-safe initialization of static objects
Date: Sun, 24 Sep 2023 19:35:51 -0400
Organization: A noiseless patient Spider
Lines: 11
Message-ID: <ueqh4n$1ienq$1@dont-email.me>
References: <udafjf$2joeq$1@dont-email.me> <zPGNM.14021$BMnd.11871@fx04.iad>
<ue7f6g$frod$2@dont-email.me> <LWINM.13017$ZkX3.12109@fx09.iad>
<ue8mn0$q534$4@dont-email.me> <uY5OM.30730$Yxl8.13078@fx14.iad>
<ueb3sb$2638l$6@dont-email.me> <ZjMOM.9398$EIy4.4982@fx48.iad>
<uegsia$3dj0r$2@dont-email.me> <fp7PM.104556$GHI6.80009@fx17.iad>
<uej631$3uji0$4@dont-email.me> <mzkPM.16155$ugs.3977@fx36.iad>
<uekler$bqj8$1@dont-email.me> <IsoPM.20139$wO91.15127@fx39.iad>
<uelqb1$lo9j$3@dont-email.me> <24DPM.126389$Hih7.28245@fx11.iad>
<uemvt2$rcgo$1@dont-email.me> <ueo915$16kh3$2@dont-email.me>
<ueoqra$19436$2@dont-email.me>
<aa307383-8415-4e39-9cca-18a0f57bf6f4n@googlegroups.com>
<uep6ss$1b36d$2@dont-email.me> <YAVPM.165857$Hih7.40004@fx11.iad>
<02a76ac9-ef3d-e3e8-92cb-7b071e2a3f44@alumni.caltech.edu>
<8a0dd2ff-e4c9-4dd4-815e-04a0c43bf696@Damon-Family.org>
<ueq94l$1h06t$1@dont-email.me> <ac3QM.21195$C_lf.20631@fx33.iad>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 24 Sep 2023 23:35:51 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="938b01b01a705e7f03f2547e9f7052d8";
logging-data="1653498"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18weuIjkX/rFajgxHEllkauVzHBx4sU53g="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.15.1
Cancel-Lock: sha1:oOyGtufl9k1YN6eHmsYmITnkyXQ=
Content-Language: en-US
In-Reply-To: <ac3QM.21195$C_lf.20631@fx33.iad>
 by: James Kuyper - Sun, 24 Sep 2023 23:35 UTC

On 9/24/23 19:00, Richard Damon wrote:
....
> Refusing to accept Truth just puts her in the same league as Peter
> Olcott and Flat Earthers.

It's a big league - there's few humans who have never been a member,
though Bonita has spent far more time in that league than most people.

All I'm saying is that you should complain about her failure to accept
the truth - don't complain about her complaints, which are a reasonable
consequence of her unreasonable refusal to accept the truth.

Re: Thread-safe initialization of static objects

<Fa5QM.124660$1B%c.102962@fx09.iad>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.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!fx09.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> <LwlNM.50924$QShe.20423@fx11.iad>
<ue4p5v$3truj$1@dont-email.me> <EjoNM.17221$DXgc.9861@fx36.iad>
<ue5tfc$7pns$1@dont-email.me> <zPGNM.14021$BMnd.11871@fx04.iad>
<ue7f6g$frod$2@dont-email.me> <LWINM.13017$ZkX3.12109@fx09.iad>
<ue8mn0$q534$4@dont-email.me> <uY5OM.30730$Yxl8.13078@fx14.iad>
<ueb3sb$2638l$6@dont-email.me> <ZjMOM.9398$EIy4.4982@fx48.iad>
<uegsia$3dj0r$2@dont-email.me> <fp7PM.104556$GHI6.80009@fx17.iad>
<uej631$3uji0$4@dont-email.me> <mzkPM.16155$ugs.3977@fx36.iad>
<uekler$bqj8$1@dont-email.me> <20230922111441.730@kylheku.com>
<uelq9h$lo9j$2@dont-email.me> <20230923041951.728@kylheku.com>
<uemlbj$pl2d$1@dont-email.me> <20230923185708.811@kylheku.com>
<ueoqpa$19436$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>
From: Rich...@Damon-Family.org (Richard Damon)
In-Reply-To: <ueqfkl$1i6un$2@dont-email.me>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 39
Message-ID: <Fa5QM.124660$1B%c.102962@fx09.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: Sun, 24 Sep 2023 21:15:17 -0400
X-Received-Bytes: 3230
 by: Richard Damon - Mon, 25 Sep 2023 01:15 UTC

On 9/24/23 7:10 PM, Bonita Montero wrote:
> Am 24.09.2023 um 18:47 schrieb Pavel:
>> Bonita Montero wrote:
>
>> Name one platform for which it is not guaranteed and that targets a
>> compliant C++11+ implementation.
>
> Any platform since lock() and unlock() might throw system_error()
> as documented.
>

Try again.

Not for pthreads, as you can ALWAYS create a mutex statically with
PTHREAD_MUTEX_INITIALZER, which will not return an error, and

there is no error condition returnable by pthread_mutex_lock that is not
caused by programmer error on a mutex so created, so no grounds for the
mutex to throw "system_error".

Remember, your need to show not that some mutex might fail, but that it
is impossible to create a mutex that won't fail.

Then there is also the fact that it has been pointed out that you don't
actually need a full mutex per object, but that some major libraries use
a single global mutex to protect a user-land built synchronization
object, where the single global mutex is only held for a very limited
time at the beginning and ending of each object initialization.

Until you show the ACTUAL ERROR with that code, your "impossible" claim
has been disproved with an example implementation that proves you to be
a liar (or an idiot).

The fact that YOU can't think of how to do it does not make it
impossible, it just shows your mental ability is not up to the needed
ability.

Re: Thread-safe initialization of static objects

<cd5QM.124661$1B%c.70710@fx09.iad>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!peer02.ams1!peer.ams1.xlned.com!news.xlned.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx09.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> <zPGNM.14021$BMnd.11871@fx04.iad>
<ue7f6g$frod$2@dont-email.me> <LWINM.13017$ZkX3.12109@fx09.iad>
<ue8mn0$q534$4@dont-email.me> <uY5OM.30730$Yxl8.13078@fx14.iad>
<ueb3sb$2638l$6@dont-email.me> <ZjMOM.9398$EIy4.4982@fx48.iad>
<uegsia$3dj0r$2@dont-email.me> <fp7PM.104556$GHI6.80009@fx17.iad>
<uej631$3uji0$4@dont-email.me> <mzkPM.16155$ugs.3977@fx36.iad>
<uekler$bqj8$1@dont-email.me> <IsoPM.20139$wO91.15127@fx39.iad>
<uelqb1$lo9j$3@dont-email.me> <24DPM.126389$Hih7.28245@fx11.iad>
<uemvt2$rcgo$1@dont-email.me> <ueo915$16kh3$2@dont-email.me>
<ueoqra$19436$2@dont-email.me>
<aa307383-8415-4e39-9cca-18a0f57bf6f4n@googlegroups.com>
<uep6ss$1b36d$2@dont-email.me> <YAVPM.165857$Hih7.40004@fx11.iad>
<uep94g$1bect$2@dont-email.me>
From: Rich...@Damon-Family.org (Richard Damon)
In-Reply-To: <uep94g$1bect$2@dont-email.me>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 23
Message-ID: <cd5QM.124661$1B%c.70710@fx09.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: Sun, 24 Sep 2023 21:18:00 -0400
X-Received-Bytes: 2415
 by: Richard Damon - Mon, 25 Sep 2023 01:18 UTC

On 9/24/23 8:13 AM, Bonita Montero wrote:
> Am 24.09.2023 um 14:04 schrieb Richard Damon:
>
>> In fact, using a mutex the way you are decribing, because it can
>> fail, in "unprofessional", and more importantly, non-conforming.
>
> Yielding is unacceptable and the only second solution that sleeps,
> as the standard mandates. I don't understand what would be the
> problem to have a system_error on a synchronization failure with
> static initialization.
>

I don't think you understand what "Yielding" actually does.

Why do you think static initialization should be allowed to fail?

Maybe it is "unacceptable" to you, but WHY?

And why is the results of yielding WORSE than the program needing to
ABORT and not run.

Slow (if it actually does make it slow) is better than not running at all.

Re: Thread-safe initialization of static objects

<ueqokh$1ndqh$1@dont-email.me>

  copy mid

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

  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....@gmail.com (Chris M. Thomasson)
Newsgroups: comp.lang.c++
Subject: Re: Thread-safe initialization of static objects
Date: Sun, 24 Sep 2023 18:43:45 -0700
Organization: A noiseless patient Spider
Lines: 14
Message-ID: <ueqokh$1ndqh$1@dont-email.me>
References: <udafjf$2joeq$1@dont-email.me> <zPGNM.14021$BMnd.11871@fx04.iad>
<ue7f6g$frod$2@dont-email.me> <LWINM.13017$ZkX3.12109@fx09.iad>
<ue8mn0$q534$4@dont-email.me> <uY5OM.30730$Yxl8.13078@fx14.iad>
<ueb3sb$2638l$6@dont-email.me> <ZjMOM.9398$EIy4.4982@fx48.iad>
<uegsia$3dj0r$2@dont-email.me> <fp7PM.104556$GHI6.80009@fx17.iad>
<uej631$3uji0$4@dont-email.me> <mzkPM.16155$ugs.3977@fx36.iad>
<uekler$bqj8$1@dont-email.me> <IsoPM.20139$wO91.15127@fx39.iad>
<uelqb1$lo9j$3@dont-email.me> <24DPM.126389$Hih7.28245@fx11.iad>
<uemvt2$rcgo$1@dont-email.me> <ueo915$16kh3$2@dont-email.me>
<ueoqra$19436$2@dont-email.me>
<aa307383-8415-4e39-9cca-18a0f57bf6f4n@googlegroups.com>
<uep6ss$1b36d$2@dont-email.me> <YAVPM.165857$Hih7.40004@fx11.iad>
<02a76ac9-ef3d-e3e8-92cb-7b071e2a3f44@alumni.caltech.edu>
<8a0dd2ff-e4c9-4dd4-815e-04a0c43bf696@Damon-Family.org>
<ueq94l$1h06t$1@dont-email.me> <ac3QM.21195$C_lf.20631@fx33.iad>
<ueqh4n$1ienq$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 25 Sep 2023 01:43:45 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="29c8ca5014253eb1ad25f97759b1defd";
logging-data="1816401"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+xDcSHbESAtPVLieBkwrUrLaIFRhdqYdk="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.15.1
Cancel-Lock: sha1:qYoIIz3oDxMOJnc3lr+b08i0cus=
In-Reply-To: <ueqh4n$1ienq$1@dont-email.me>
Content-Language: en-US
 by: Chris M. Thomasson - Mon, 25 Sep 2023 01:43 UTC

On 9/24/2023 4:35 PM, James Kuyper wrote:
> On 9/24/23 19:00, Richard Damon wrote:
> ...
>> Refusing to accept Truth just puts her in the same league as Peter
>> Olcott and Flat Earthers.
>
> It's a big league - there's few humans who have never been a member,
> though Bonita has spent far more time in that league than most people.
>
> All I'm saying is that you should complain about her failure to accept
> the truth - don't complain about her complaints, which are a reasonable
> consequence of her unreasonable refusal to accept the truth.

Well, that is fair enough. Touche.

Re: Thread-safe initialization of static objects

<ueqoo1$1ndqh$2@dont-email.me>

  copy mid

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

  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....@gmail.com (Chris M. Thomasson)
Newsgroups: comp.lang.c++
Subject: Re: Thread-safe initialization of static objects
Date: Sun, 24 Sep 2023 18:45:37 -0700
Organization: A noiseless patient Spider
Lines: 13
Message-ID: <ueqoo1$1ndqh$2@dont-email.me>
References: <udafjf$2joeq$1@dont-email.me> <udqq8u$1p3q6$1@dont-email.me>
<uds0qa$22qfj$1@dont-email.me> <udtg9s$2aqb5$1@dont-email.me>
<uduimg$2imqi$1@dont-email.me> <FUEMM.7469$ZkX3.6739@fx09.iad>
<ue3bhh$3l4s1$1@dont-email.me> <ue3nga$3ms5s$1@dont-email.me>
<eohNM.4832$3lL1.1360@fx47.iad> <ue4cqe$3rjfr$1@dont-email.me>
<LwlNM.50924$QShe.20423@fx11.iad> <ue4p5v$3truj$1@dont-email.me>
<EjoNM.17221$DXgc.9861@fx36.iad> <ue5tfc$7pns$1@dont-email.me>
<zPGNM.14021$BMnd.11871@fx04.iad> <ue7f6g$frod$2@dont-email.me>
<LWINM.13017$ZkX3.12109@fx09.iad> <ue8mn0$q534$4@dont-email.me>
<uY5OM.30730$Yxl8.13078@fx14.iad> <ueb3sb$2638l$6@dont-email.me>
<ZjMOM.9398$EIy4.4982@fx48.iad> <uegsia$3dj0r$2@dont-email.me>
<fp7PM.104556$GHI6.80009@fx17.iad> <uej631$3uji0$4@dont-email.me>
<VnsPM.122464$Hih7.52058@fx11.iad> <uelqeq$lo9j$4@dont-email.me>
<XbJPM.157838$Hih7.40116@fx11.iad> <ueo5ps$163k0$1@dont-email.me>
<Y3_PM.16749$E_d1.14707@fx04.iad> <ueqfec$1i6un$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 25 Sep 2023 01:45:37 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="29c8ca5014253eb1ad25f97759b1defd";
logging-data="1816401"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX184qWmG1f91DwgaoNOBs2iMCSzqLMVnPIo="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.15.1
Cancel-Lock: sha1:n5W8TxJLDhBgpFs7TdcXLgSoqz4=
In-Reply-To: <ueqfec$1i6un$1@dont-email.me>
Content-Language: en-US
 by: Chris M. Thomasson - Mon, 25 Sep 2023 01:45 UTC

On 9/24/2023 4:06 PM, Bonita Montero wrote:
> Am 24.09.2023 um 19:10 schrieb Pavel:
>
>> so? everyone has been telling you initialization of simple mutices
>> does  not fail. After few hundred posts, you decided to agree?
>
> lock() and unlock() might throw system_error.
>
>

Well, then it kind seems like you are try to suggest that any 100%
compliant and working program that uses threads, is a ticking time bomb
that can explode at random times, willy nilly?

Re: Thread-safe initialization of static objects

<uequ5j$1o6ue$1@dont-email.me>

  copy mid

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

  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....@gmail.com (Chris M. Thomasson)
Newsgroups: comp.lang.c++
Subject: Re: Thread-safe initialization of static objects
Date: Sun, 24 Sep 2023 20:18:11 -0700
Organization: A noiseless patient Spider
Lines: 12
Message-ID: <uequ5j$1o6ue$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: Mon, 25 Sep 2023 03:18:12 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="29c8ca5014253eb1ad25f97759b1defd";
logging-data="1842126"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18ZGbLYEQdAFWs47lgxyxMqVlXw8ixIV+0="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.15.1
Cancel-Lock: sha1:PGrhpkdrxSQsJkyUNcBzplNgLm4=
In-Reply-To: <udafjf$2joeq$1@dont-email.me>
Content-Language: en-US
 by: Chris M. Thomasson - Mon, 25 Sep 2023 03:18 UTC

On 9/6/2023 11:15 AM, Bonita Montero wrote:
> With C++11 static local or global data is initialized thread-safe.
[...]

I am wondering why Bonita kind of reminds of a slow walked version of
the following song wrt learning state of the art threading and sync
techniques?

https://youtu.be/FE-hBbBBGBs

;^)

Re: Thread-safe initialization of static objects

<ueqvu3$1obug$1@dont-email.me>

  copy mid

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

  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....@gmail.com (Chris M. Thomasson)
Newsgroups: comp.lang.c++
Subject: Re: Thread-safe initialization of static objects
Date: Sun, 24 Sep 2023 20:48:18 -0700
Organization: A noiseless patient Spider
Lines: 14
Message-ID: <ueqvu3$1obug$1@dont-email.me>
References: <udafjf$2joeq$1@dont-email.me> <1h7KM.66324$Wk53.59929@fx01.iad>
<udbqs7$2t34f$1@dont-email.me> <udbs1f$2t79o$1@dont-email.me>
<udbtda$2tdm8$1@dont-email.me> <udcf19$2vuf5$1@dont-email.me>
<udd6vm$33f8r$1@dont-email.me> <udd87f$33lr1$1@dont-email.me>
<udd90h$33peq$1@dont-email.me> <udda40$33ub2$1@dont-email.me>
<udg01c$3m3qc$2@dont-email.me> <4OOKM.167484$uEkc.38090@fx35.iad>
<udggc7$3ou77$1@dont-email.me> <udggmi$3ou77$2@dont-email.me>
<7p2LM.1449513$GMN3.1325499@fx16.iad> <udj9o1$dg67$1@dont-email.me>
<A_qLM.257894$JG_b.81867@fx39.iad>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 25 Sep 2023 03:48:19 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="29c8ca5014253eb1ad25f97759b1defd";
logging-data="1847248"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/AEkMklC2d2UCdPBjR9ngiBNh+pYZ/b3s="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.15.1
Cancel-Lock: sha1:KWmwEWY7kjbUsODV/d2itYXuvYY=
Content-Language: en-US
In-Reply-To: <A_qLM.257894$JG_b.81867@fx39.iad>
 by: Chris M. Thomasson - Mon, 25 Sep 2023 03:48 UTC

On 9/10/2023 2:58 PM, Pavel wrote:
> Chris M. Thomasson wrote:
[...]
>> Windows has:
>>
>> https://learn.microsoft.com/en-us/windows/win32/api/synchapi/nf-synchapi-initonceexecuteonce
>>
>> https://learn.microsoft.com/en-us/windows/win32/api/synchapi/nf-synchapi-initonceinitialize
> Thanks, this does seem to be a simple user-friendly API that is most
> appropriate to implement static initialization as in C++.

Indeed. Windows has the API's necessary to implement it.

[...]

Re: Thread-safe initialization of static objects

<uerbhv$1q0ue$1@dont-email.me>

  copy mid

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

  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....@gmail.com (Chris M. Thomasson)
Newsgroups: comp.lang.c++
Subject: Re: Thread-safe initialization of static objects
Date: Mon, 25 Sep 2023 00:06:39 -0700
Organization: A noiseless patient Spider
Lines: 16
Message-ID: <uerbhv$1q0ue$1@dont-email.me>
References: <udafjf$2joeq$1@dont-email.me> <uequ5j$1o6ue$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 25 Sep 2023 07:06:39 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="29c8ca5014253eb1ad25f97759b1defd";
logging-data="1901518"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18MSK+FvEGQb/xn4TPxg5InaPJ0+QZYSOI="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.15.1
Cancel-Lock: sha1:ISN5C8CdjmwD4foqXP+XacAnC2E=
Content-Language: en-US
In-Reply-To: <uequ5j$1o6ue$1@dont-email.me>
 by: Chris M. Thomasson - Mon, 25 Sep 2023 07:06 UTC

On 9/24/2023 8:18 PM, Chris M. Thomasson wrote:
> On 9/6/2023 11:15 AM, Bonita Montero wrote:
>> With C++11 static local or global data is initialized thread-safe.
> [...]
>
> I am wondering why Bonita kind of reminds of a slow walked version of
> the following song wrt learning state of the art threading and sync
> techniques?
>
> https://youtu.be/FE-hBbBBGBs
>
> ;^)
>

Actually, sometimes I think Bonita might a clever troll, that actually
knows how to programs threads. Strange.

Re: Thread-safe initialization of static objects

<uerem0$1qg8s$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Bonita.M...@gmail.com (Bonita Montero)
Newsgroups: comp.lang.c++
Subject: Re: Thread-safe initialization of static objects
Date: Mon, 25 Sep 2023 10:00:00 +0200
Organization: A noiseless patient Spider
Lines: 7
Message-ID: <uerem0$1qg8s$1@dont-email.me>
References: <udafjf$2joeq$1@dont-email.me> <LwlNM.50924$QShe.20423@fx11.iad>
<ue4p5v$3truj$1@dont-email.me> <EjoNM.17221$DXgc.9861@fx36.iad>
<ue5tfc$7pns$1@dont-email.me> <zPGNM.14021$BMnd.11871@fx04.iad>
<ue7f6g$frod$2@dont-email.me> <LWINM.13017$ZkX3.12109@fx09.iad>
<ue8mn0$q534$4@dont-email.me> <uY5OM.30730$Yxl8.13078@fx14.iad>
<ueb3sb$2638l$6@dont-email.me> <ZjMOM.9398$EIy4.4982@fx48.iad>
<uegsia$3dj0r$2@dont-email.me> <fp7PM.104556$GHI6.80009@fx17.iad>
<uej631$3uji0$4@dont-email.me> <mzkPM.16155$ugs.3977@fx36.iad>
<uekler$bqj8$1@dont-email.me> <20230922111441.730@kylheku.com>
<uelq9h$lo9j$2@dont-email.me> <20230923041951.728@kylheku.com>
<uemlbj$pl2d$1@dont-email.me> <20230923185708.811@kylheku.com>
<ueoqpa$19436$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>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 25 Sep 2023 08:00:00 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="e2ba2e234a6dcf9f0afcd3d90854525d";
logging-data="1917212"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19OI87hTcX38X0jZ/iPNzbMIq/Dyqma+n0="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:lX95aAXhxhXnnWSyd1TqPoOD8Qg=
Content-Language: de-DE
In-Reply-To: <Fa5QM.124660$1B%c.102962@fx09.iad>
 by: Bonita Montero - Mon, 25 Sep 2023 08:00 UTC

Am 25.09.2023 um 03:15 schrieb Richard Damon:

> Not for pthreads, ...

The standard honors plattforms where an error may arise,
so it should also do that for static initialization.

Re: Thread-safe initialization of static objects

<uereqt$1qg8s$2@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Bonita.M...@gmail.com (Bonita Montero)
Newsgroups: comp.lang.c++
Subject: Re: Thread-safe initialization of static objects
Date: Mon, 25 Sep 2023 10:02:37 +0200
Organization: A noiseless patient Spider
Lines: 7
Message-ID: <uereqt$1qg8s$2@dont-email.me>
References: <udafjf$2joeq$1@dont-email.me> <zPGNM.14021$BMnd.11871@fx04.iad>
<ue7f6g$frod$2@dont-email.me> <LWINM.13017$ZkX3.12109@fx09.iad>
<ue8mn0$q534$4@dont-email.me> <uY5OM.30730$Yxl8.13078@fx14.iad>
<ueb3sb$2638l$6@dont-email.me> <ZjMOM.9398$EIy4.4982@fx48.iad>
<uegsia$3dj0r$2@dont-email.me> <fp7PM.104556$GHI6.80009@fx17.iad>
<uej631$3uji0$4@dont-email.me> <mzkPM.16155$ugs.3977@fx36.iad>
<uekler$bqj8$1@dont-email.me> <IsoPM.20139$wO91.15127@fx39.iad>
<uelqb1$lo9j$3@dont-email.me> <24DPM.126389$Hih7.28245@fx11.iad>
<uemvt2$rcgo$1@dont-email.me> <ueo915$16kh3$2@dont-email.me>
<ueoqra$19436$2@dont-email.me>
<aa307383-8415-4e39-9cca-18a0f57bf6f4n@googlegroups.com>
<uep6ss$1b36d$2@dont-email.me> <YAVPM.165857$Hih7.40004@fx11.iad>
<uep94g$1bect$2@dont-email.me> <cd5QM.124661$1B%c.70710@fx09.iad>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 25 Sep 2023 08:02:37 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="e2ba2e234a6dcf9f0afcd3d90854525d";
logging-data="1917212"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+IGdp6Y+9HBSlJv39TBUEfgfFlgh3oTRs="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:OK2e4uL/mvPf2WuUCrOa1w+DLjY=
Content-Language: de-DE
In-Reply-To: <cd5QM.124661$1B%c.70710@fx09.iad>
 by: Bonita Montero - Mon, 25 Sep 2023 08:02 UTC

Am 25.09.2023 um 03:18 schrieb Richard Damon:

> Why do you think static initialization should be allowed to fail?

For the same reasons mutex::lock() and ::unlock()
may throw system_error.

Re: Thread-safe initialization of static objects

<ZYdQM.67167$3vM.17655@fx37.iad>

  copy mid

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

  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!fx37.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> <ue4p5v$3truj$1@dont-email.me>
<EjoNM.17221$DXgc.9861@fx36.iad> <ue5tfc$7pns$1@dont-email.me>
<zPGNM.14021$BMnd.11871@fx04.iad> <ue7f6g$frod$2@dont-email.me>
<LWINM.13017$ZkX3.12109@fx09.iad> <ue8mn0$q534$4@dont-email.me>
<uY5OM.30730$Yxl8.13078@fx14.iad> <ueb3sb$2638l$6@dont-email.me>
<ZjMOM.9398$EIy4.4982@fx48.iad> <uegsia$3dj0r$2@dont-email.me>
<fp7PM.104556$GHI6.80009@fx17.iad> <uej631$3uji0$4@dont-email.me>
<mzkPM.16155$ugs.3977@fx36.iad> <uekler$bqj8$1@dont-email.me>
<20230922111441.730@kylheku.com> <uelq9h$lo9j$2@dont-email.me>
<20230923041951.728@kylheku.com> <uemlbj$pl2d$1@dont-email.me>
<20230923185708.811@kylheku.com> <ueoqpa$19436$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>
From: Rich...@Damon-Family.org (Richard Damon)
In-Reply-To: <uerem0$1qg8s$1@dont-email.me>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 21
Message-ID: <ZYdQM.67167$3vM.17655@fx37.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: Mon, 25 Sep 2023 07:15:05 -0400
X-Received-Bytes: 2492
 by: Richard Damon - Mon, 25 Sep 2023 11:15 UTC

On 9/25/23 4:00 AM, Bonita Montero wrote:
> Am 25.09.2023 um 03:15 schrieb Richard Damon:
>
>> Not for pthreads, ...
>
> The standard honors plattforms where an error may arise,
> so it should also do that for static initialization.
>

So, you admit you lied when you said the problem you claimed applied to
ALL operating systems.

The reason the Standard allows Mutex lock to throw the error is because
in some cases you might get an error, normally in response to a
programmer error.

The Standard just doesn't allow the implementation to use a Mutex in
those error conditions for initialization syncronization.

Again, you are showing your ignorance by insisting that the Standard
give leniency to the implementation to allow it to do things wrong.

Re: Thread-safe initialization of static objects

<0ZdQM.67168$3vM.59997@fx37.iad>

  copy mid

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

  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!fx37.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> <zPGNM.14021$BMnd.11871@fx04.iad>
<ue7f6g$frod$2@dont-email.me> <LWINM.13017$ZkX3.12109@fx09.iad>
<ue8mn0$q534$4@dont-email.me> <uY5OM.30730$Yxl8.13078@fx14.iad>
<ueb3sb$2638l$6@dont-email.me> <ZjMOM.9398$EIy4.4982@fx48.iad>
<uegsia$3dj0r$2@dont-email.me> <fp7PM.104556$GHI6.80009@fx17.iad>
<uej631$3uji0$4@dont-email.me> <mzkPM.16155$ugs.3977@fx36.iad>
<uekler$bqj8$1@dont-email.me> <IsoPM.20139$wO91.15127@fx39.iad>
<uelqb1$lo9j$3@dont-email.me> <24DPM.126389$Hih7.28245@fx11.iad>
<uemvt2$rcgo$1@dont-email.me> <ueo915$16kh3$2@dont-email.me>
<ueoqra$19436$2@dont-email.me>
<aa307383-8415-4e39-9cca-18a0f57bf6f4n@googlegroups.com>
<uep6ss$1b36d$2@dont-email.me> <YAVPM.165857$Hih7.40004@fx11.iad>
<uep94g$1bect$2@dont-email.me> <cd5QM.124661$1B%c.70710@fx09.iad>
<uereqt$1qg8s$2@dont-email.me>
From: Rich...@Damon-Family.org (Richard Damon)
In-Reply-To: <uereqt$1qg8s$2@dont-email.me>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 17
Message-ID: <0ZdQM.67168$3vM.59997@fx37.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: Mon, 25 Sep 2023 07:15:07 -0400
X-Received-Bytes: 2126
 by: Richard Damon - Mon, 25 Sep 2023 11:15 UTC

On 9/25/23 4:02 AM, Bonita Montero wrote:
> Am 25.09.2023 um 03:18 schrieb Richard Damon:
>
>> Why do you think static initialization should be allowed to fail?
>
> For the same reasons mutex::lock() and ::unlock()
> may throw system_error.
>

Except that mutex::lock can't throw system_error in the use case for
proper use in static initialization.

You argument is basically, the Standard needs to allow for BAD
implementation to exist.

The fact you don't understand how the "good" implementations work, just
shows your ignorance.

Re: Thread-safe initialization of static objects

<uerv9b$1tqis$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Bonita.M...@gmail.com (Bonita Montero)
Newsgroups: comp.lang.c++
Subject: Re: Thread-safe initialization of static objects
Date: Mon, 25 Sep 2023 14:43:23 +0200
Organization: A noiseless patient Spider
Lines: 12
Message-ID: <uerv9b$1tqis$1@dont-email.me>
References: <udafjf$2joeq$1@dont-email.me> <EjoNM.17221$DXgc.9861@fx36.iad>
<ue5tfc$7pns$1@dont-email.me> <zPGNM.14021$BMnd.11871@fx04.iad>
<ue7f6g$frod$2@dont-email.me> <LWINM.13017$ZkX3.12109@fx09.iad>
<ue8mn0$q534$4@dont-email.me> <uY5OM.30730$Yxl8.13078@fx14.iad>
<ueb3sb$2638l$6@dont-email.me> <ZjMOM.9398$EIy4.4982@fx48.iad>
<uegsia$3dj0r$2@dont-email.me> <fp7PM.104556$GHI6.80009@fx17.iad>
<uej631$3uji0$4@dont-email.me> <mzkPM.16155$ugs.3977@fx36.iad>
<uekler$bqj8$1@dont-email.me> <20230922111441.730@kylheku.com>
<uelq9h$lo9j$2@dont-email.me> <20230923041951.728@kylheku.com>
<uemlbj$pl2d$1@dont-email.me> <20230923185708.811@kylheku.com>
<ueoqpa$19436$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>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 25 Sep 2023 12:43:23 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="e2ba2e234a6dcf9f0afcd3d90854525d";
logging-data="2026076"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+FpY3SKtLl/Xz9UhK05GkPf/Wmg4dCla0="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:3LSWNGXTzYxkW84+07fzxHVq8O0=
In-Reply-To: <ZYdQM.67167$3vM.17655@fx37.iad>
Content-Language: de-DE
 by: Bonita Montero - Mon, 25 Sep 2023 12:43 UTC

Am 25.09.2023 um 13:15 schrieb Richard Damon:

> So, you admit you lied when you said the problem you claimed applied to
> ALL operating systems.

I never said that.

> The reason the Standard allows Mutex lock to throw the error is
> because in some cases you might get an error, normally in response
> to a programmer error.

You don't know that.

Re: Thread-safe initialization of static objects

<40iQM.146456$bmw6.71801@fx10.iad>

  copy mid

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

  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!fx10.iad.POSTED!not-for-mail
X-newsreader: xrn 9.03-beta-14-64bit
Sender: scott@dragon.sl.home (Scott Lurndal)
From: sco...@slp53.sl.home (Scott Lurndal)
Reply-To: slp53@pacbell.net
Subject: Re: Thread-safe initialization of static objects
Newsgroups: comp.lang.c++
References: <udafjf$2joeq$1@dont-email.me> <LWINM.13017$ZkX3.12109@fx09.iad> <ue8mn0$q534$4@dont-email.me> <uY5OM.30730$Yxl8.13078@fx14.iad> <ueb3sb$2638l$6@dont-email.me> <ZjMOM.9398$EIy4.4982@fx48.iad> <uegsia$3dj0r$2@dont-email.me> <fp7PM.104556$GHI6.80009@fx17.iad> <uej631$3uji0$4@dont-email.me> <VnsPM.122464$Hih7.52058@fx11.iad> <uelqeq$lo9j$4@dont-email.me> <XbJPM.157838$Hih7.40116@fx11.iad> <ueo5ps$163k0$1@dont-email.me> <Y3_PM.16749$E_d1.14707@fx04.iad> <ueqfec$1i6un$1@dont-email.me>
Lines: 9
Message-ID: <40iQM.146456$bmw6.71801@fx10.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Mon, 25 Sep 2023 15:51:28 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Mon, 25 Sep 2023 15:51:28 GMT
X-Received-Bytes: 1361
 by: Scott Lurndal - Mon, 25 Sep 2023 15:51 UTC

Bonita Montero <Bonita.Montero@gmail.com> writes:
>Am 24.09.2023 um 19:10 schrieb Pavel:
>
>> so? everyone has been telling you initialization of simple mutices
>> does not fail. After few hundred posts, you decided to agree?
>
>lock() and unlock() might throw system_error.

lock() and unlock() cannot throw any error.


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

Pages:123456789101112131415161718192021222324252627
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor