Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

19 May, 2024: Line wrapping has been changed to be consistent with Usenet standards.
 If you find that it is broken please let me know here rocksolid.nodes.help


devel / comp.lang.c++ / Re: A Java- / .NET-like monitor

SubjectAuthor
* A Java- / .NET-like monitorBonita Montero
+* Re: A Java- / .NET-like monitorBonita Montero
|`* Re: A Java- / .NET-like monitorChris M. Thomasson
| +* Re: A Java- / .NET-like monitorChris M. Thomasson
| |+* Re: A Java- / .NET-like monitorBonita Montero
| ||`- Re: A Java- / .NET-like monitorChris M. Thomasson
| |`- Re: A Java- / .NET-like monitorChris M. Thomasson
| `* Re: A Java- / .NET-like monitorBonita Montero
|  `- Re: A Java- / .NET-like monitorChris M. Thomasson
+* Re: A Java- / .NET-like monitorKaz Kylheku
|`* Re: A Java- / .NET-like monitorBonita Montero
| `* Re: A Java- / .NET-like monitorKaz Kylheku
|  `* Re: A Java- / .NET-like monitorBonita Montero
|   +* Re: A Java- / .NET-like monitorChris M. Thomasson
|   |`* Re: A Java- / .NET-like monitorKaz Kylheku
|   | `- Re: A Java- / .NET-like monitorChris M. Thomasson
|   +* Re: A Java- / .NET-like monitorKaz Kylheku
|   |`* Re: A Java- / .NET-like monitorBonita Montero
|   | +* Re: A Java- / .NET-like monitorChris M. Thomasson
|   | |`* Re: A Java- / .NET-like monitorBonita Montero
|   | | `* Re: A Java- / .NET-like monitorChris M. Thomasson
|   | |  `* Re: A Java- / .NET-like monitorBonita Montero
|   | |   +* Re: A Java- / .NET-like monitorChris M. Thomasson
|   | |   |+- Re: A Java- / .NET-like monitorChris M. Thomasson
|   | |   |`* Re: A Java- / .NET-like monitorBonita Montero
|   | |   | `* Re: A Java- / .NET-like monitorChris M. Thomasson
|   | |   |  `* Re: A Java- / .NET-like monitorBonita Montero
|   | |   |   +* Re: A Java- / .NET-like monitorChris M. Thomasson
|   | |   |   |+- Re: A Java- / .NET-like monitorChris M. Thomasson
|   | |   |   |`* Re: A Java- / .NET-like monitorBonita Montero
|   | |   |   | `* Re: A Java- / .NET-like monitorChris M. Thomasson
|   | |   |   |  +- Re: A Java- / .NET-like monitorChris M. Thomasson
|   | |   |   |  `* Re: A Java- / .NET-like monitorBonita Montero
|   | |   |   |   `* Re: A Java- / .NET-like monitorChris M. Thomasson
|   | |   |   |    +* Re: A Java- / .NET-like monitorChris M. Thomasson
|   | |   |   |    |`* Re: A Java- / .NET-like monitorChris M. Thomasson
|   | |   |   |    | `- Re: A Java- / .NET-like monitorChris M. Thomasson
|   | |   |   |    +* Re: A Java- / .NET-like monitorBonita Montero
|   | |   |   |    |`* Re: A Java- / .NET-like monitorPavel
|   | |   |   |    | `* Re: A Java- / .NET-like monitorBonita Montero
|   | |   |   |    |  `* Re: A Java- / .NET-like monitorPavel
|   | |   |   |    |   `* Re: A Java- / .NET-like monitorBonita Montero
|   | |   |   |    |    `* Re: A Java- / .NET-like monitorPavel
|   | |   |   |    |     +- Re: A Java- / .NET-like monitorBonita Montero
|   | |   |   |    |     +* Re: A Java- / .NET-like monitorScott Lurndal
|   | |   |   |    |     |+* Re: A Java- / .NET-like monitorKaz Kylheku
|   | |   |   |    |     ||+- Re: A Java- / .NET-like monitorScott Lurndal
|   | |   |   |    |     ||+- Re: A Java- / .NET-like monitorPavel
|   | |   |   |    |     ||`* Re: A Java- / .NET-like monitorMichael S
|   | |   |   |    |     || `* Re: A Java- / .NET-like monitorChris M. Thomasson
|   | |   |   |    |     ||  `* Re: A Java- / .NET-like monitorBonita Montero
|   | |   |   |    |     ||   `* Re: A Java- / .NET-like monitorChris M. Thomasson
|   | |   |   |    |     ||    +- Re: A Java- / .NET-like monitorBonita Montero
|   | |   |   |    |     ||    `* Re: A Java- / .NET-like monitorScott Lurndal
|   | |   |   |    |     ||     `* Re: A Java- / .NET-like monitorKaz Kylheku
|   | |   |   |    |     ||      +* Re: A Java- / .NET-like monitorChris M. Thomasson
|   | |   |   |    |     ||      |`* Re: A Java- / .NET-like monitorScott Lurndal
|   | |   |   |    |     ||      | +* Re: A Java- / .NET-like monitorChris M. Thomasson
|   | |   |   |    |     ||      | |`- Re: A Java- / .NET-like monitorChris M. Thomasson
|   | |   |   |    |     ||      | `* Re: A Java- / .NET-like monitorFred. Zwarts
|   | |   |   |    |     ||      |  `* Re: A Java- / .NET-like monitorScott Lurndal
|   | |   |   |    |     ||      |   `* Re: A Java- / .NET-like monitorBonita Montero
|   | |   |   |    |     ||      |    `- Re: A Java- / .NET-like monitorScott Lurndal
|   | |   |   |    |     ||      +* Re: A Java- / .NET-like monitorBonita Montero
|   | |   |   |    |     ||      |`* Re: A Java- / .NET-like monitorKaz Kylheku
|   | |   |   |    |     ||      | `* Re: A Java- / .NET-like monitorScott Lurndal
|   | |   |   |    |     ||      |  +- Re: A Java- / .NET-like monitorChris M. Thomasson
|   | |   |   |    |     ||      |  `* Re: A Java- / .NET-like monitorMichael S
|   | |   |   |    |     ||      |   +- Re: A Java- / .NET-like monitorChris M. Thomasson
|   | |   |   |    |     ||      |   `* Re: A Java- / .NET-like monitorDavid Brown
|   | |   |   |    |     ||      |    +* Re: A Java- / .NET-like monitorBonita Montero
|   | |   |   |    |     ||      |    |+* Re: A Java- / .NET-like monitorDavid Brown
|   | |   |   |    |     ||      |    ||`* Re: A Java- / .NET-like monitorBonita Montero
|   | |   |   |    |     ||      |    || `* Re: A Java- / .NET-like monitorDavid Brown
|   | |   |   |    |     ||      |    ||  +* Re: A Java- / .NET-like monitorChris M. Thomasson
|   | |   |   |    |     ||      |    ||  |`- Re: A Java- / .NET-like monitorChris M. Thomasson
|   | |   |   |    |     ||      |    ||  `* Re: A Java- / .NET-like monitorBonita Montero
|   | |   |   |    |     ||      |    ||   `* Re: A Java- / .NET-like monitorDavid Brown
|   | |   |   |    |     ||      |    ||    `* Re: A Java- / .NET-like monitorBonita Montero
|   | |   |   |    |     ||      |    ||     `* Re: A Java- / .NET-like monitorDavid Brown
|   | |   |   |    |     ||      |    ||      `- Re: A Java- / .NET-like monitorBonita Montero
|   | |   |   |    |     ||      |    |`- Re: A Java- / .NET-like monitorScott Lurndal
|   | |   |   |    |     ||      |    `* Re: A Java- / .NET-like monitorChris M. Thomasson
|   | |   |   |    |     ||      |     `- Re: A Java- / .NET-like monitorDavid Brown
|   | |   |   |    |     ||      `- Re: A Java- / .NET-like monitorDavid Brown
|   | |   |   |    |     |+- Re: A Java- / .NET-like monitorPavel
|   | |   |   |    |     |`* Re: A Java- / .NET-like monitorBonita Montero
|   | |   |   |    |     | `* Re: A Java- / .NET-like monitorKaz Kylheku
|   | |   |   |    |     |  `* Re: A Java- / .NET-like monitorBonita Montero
|   | |   |   |    |     |   `* Re: A Java- / .NET-like monitorKaz Kylheku
|   | |   |   |    |     |    `* Re: A Java- / .NET-like monitorBonita Montero
|   | |   |   |    |     |     `* Re: A Java- / .NET-like monitorChris M. Thomasson
|   | |   |   |    |     |      +* Re: A Java- / .NET-like monitorChris M. Thomasson
|   | |   |   |    |     |      |`- Re: A Java- / .NET-like monitorChris M. Thomasson
|   | |   |   |    |     |      `* Re: A Java- / .NET-like monitorBonita Montero
|   | |   |   |    |     |       `* Re: A Java- / .NET-like monitorChris M. Thomasson
|   | |   |   |    |     |        `* Re: A Java- / .NET-like monitorBonita Montero
|   | |   |   |    |     |         `* Re: A Java- / .NET-like monitorChris M. Thomasson
|   | |   |   |    |     |          `* Re: A Java- / .NET-like monitorBonita Montero
|   | |   |   |    |     |           `* Re: A Java- / .NET-like monitorChris M. Thomasson
|   | |   |   |    |     |            `* Re: A Java- / .NET-like monitorBonita Montero
|   | |   |   |    |     `* Re: A Java- / .NET-like monitorChris M. Thomasson
|   | |   |   |    `* Re: A Java- / .NET-like monitorBonita Montero
|   | |   |   `- Re: A Java- / .NET-like monitorBonita Montero
|   | |   `* Re: A Java- / .NET-like monitorPavel
|   | `* Re: A Java- / .NET-like monitorKaz Kylheku
|   `* Re: A Java- / .NET-like monitorChris M. Thomasson
+* Re: A Java- / .NET-like monitorBonita Montero
`* Re: A Java- / .NET-like monitorBonita Montero

Pages:1234567891011
Re: A Java- / .NET-like monitor

<uk1upa$3o8o9$1@raubtier-asyl.eternal-september.org>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!news.chmurka.net!usenet.goja.nl.eu.org!3.eu.feeder.erje.net!feeder.erje.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!raubtier-asyl.eternal-september.org!.POSTED!not-for-mail
From: Bonita.M...@gmail.com (Bonita Montero)
Newsgroups: comp.lang.c++
Subject: Re: A Java- / .NET-like monitor
Date: Mon, 27 Nov 2023 12:32:58 +0100
Organization: A noiseless patient Spider
Lines: 13
Message-ID: <uk1upa$3o8o9$1@raubtier-asyl.eternal-september.org>
References: <uig7jl$1l4v0$1@raubtier-asyl.eternal-september.org>
<CS66N.35203$cAm7.7747@fx18.iad> <Tb86N.7506$xeV4.1209@fx45.iad>
<20231118122549.392@kylheku.com> <20231124011442.00004937@yahoo.com>
<ujpcnq$27892$1@dont-email.me>
<ujpl4m$28aoq$4@raubtier-asyl.eternal-september.org>
<ujppo2$28srl$5@dont-email.me> <bL38N.65219$cAm7.33028@fx18.iad>
<20231124102842.71@kylheku.com>
<ujsobk$2ps2p$1@raubtier-asyl.eternal-september.org>
<20231125100947.641@kylheku.com> <%Wr8N.40010$zh16.35086@fx48.iad>
<20231126012940.00001397@yahoo.com> <ujvf5l$3934n$1@dont-email.me>
<ujvhph$39dt7$1@raubtier-asyl.eternal-september.org>
<ujvo70$3adcv$1@dont-email.me>
<uk00ih$3bl9e$1@raubtier-asyl.eternal-september.org>
<uk067q$3ck1o$1@dont-email.me>
<uk15kj$3knut$1@raubtier-asyl.eternal-september.org>
<uk1o1s$3n832$1@dont-email.me>
<uk1p35$3nbhb$1@raubtier-asyl.eternal-september.org>
<uk1qfb$3nimb$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 27 Nov 2023 11:32:58 -0000 (UTC)
Injection-Info: raubtier-asyl.eternal-september.org; posting-host="d317781494fe07ff2581ef843a582dff";
logging-data="3941129"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19RwkWGm60LeCByvBoBFWYqssBKWm/l89s="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:q/Qvwf7lBPA8BMzkXF/BEneibJM=
In-Reply-To: <uk1qfb$3nimb$1@dont-email.me>
Content-Language: de-DE
 by: Bonita Montero - Mon, 27 Nov 2023 11:32 UTC

Am 27.11.2023 um 11:19 schrieb David Brown:

> No, I said that most of the standard library is useless for the work
> I do, but useful for other people.  And I've said that exceptions
> can be useful (but not for my work), but are not the kind of wonderful
> universal "clean" failure handling mechanism you seem to believe.

That's a matter of opinion. I'm not a painful person like you and I
think error handling in C++ with exceptions and RAII is great relief
over manual return code handling and no RAII. With that error handling
is just catching errors in a central place and reporting that error;
that's not much work compared to C.

Re: A Java- / .NET-like monitor

<uk3703$3utkg$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.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: A Java- / .NET-like monitor
Date: Mon, 27 Nov 2023 14:59:14 -0800
Organization: A noiseless patient Spider
Lines: 39
Message-ID: <uk3703$3utkg$1@dont-email.me>
References: <uig7jl$1l4v0$1@raubtier-asyl.eternal-september.org>
<20231118205852.379@kylheku.com>
<ujc8ad$3n2sv$1@raubtier-asyl.eternal-september.org>
<20231118220242.793@kylheku.com>
<ujcq5b$3pgf8$2@raubtier-asyl.eternal-september.org>
<ujdq0m$3u8mv$7@dont-email.me>
<ujfj9t$admf$1@raubtier-asyl.eternal-september.org>
<ujgeu8$evq1$1@dont-email.me>
<ujht1s$p85k$1@raubtier-asyl.eternal-september.org>
<ujpctk$27892$2@dont-email.me>
<ujpkul$28aoq$2@raubtier-asyl.eternal-september.org>
<ujpq0f$28srl$6@dont-email.me>
<ujqotn$2dtfl$1@raubtier-asyl.eternal-september.org>
<ujrce8$2gjhg$4@dont-email.me>
<ujsnr8$2prnc$1@raubtier-asyl.eternal-september.org>
<ujtuku$2v76e$5@dont-email.me>
<ujv727$37tp2$1@raubtier-asyl.eternal-september.org>
<uk0lb3$3er0k$1@dont-email.me>
<uk15l9$3knut$2@raubtier-asyl.eternal-september.org>
<uk1cj3$3li7q$2@dont-email.me>
<uk1i4n$3m9qq$1@raubtier-asyl.eternal-september.org>
<uk1jv5$3mhgq$1@dont-email.me>
<uk1kah$3mkqg$1@raubtier-asyl.eternal-september.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 27 Nov 2023 22:59:15 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="30f2cf8ee5bf5c1f108724574b2965a0";
logging-data="4159120"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18wDH9hw3Gt1USn/K+pXlb4q1kXn7GcemU="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:2ZzY83v86Ex0zy8AmC6Qflx0mvw=
In-Reply-To: <uk1kah$3mkqg$1@raubtier-asyl.eternal-september.org>
Content-Language: en-US
 by: Chris M. Thomasson - Mon, 27 Nov 2023 22:59 UTC

On 11/27/2023 12:34 AM, Bonita Montero wrote:
> Am 27.11.2023 um 09:28 schrieb Chris M. Thomasson:
>
>> On 11/26/2023 11:57 PM, Bonita Montero wrote:
>
>>> I told you twice that this would make sense if you additionally would
>>> wait for some other waitable kernel objects. If the IOCP is signalled
>>> you'd do an additional GQCS() on the IOCP. This actually works with
>>> Windows 11 and it would be nice if MS would document since which Win-
>>> dows version it is safe to have a WFMO() on a IOCP.
>
>> This is undocumented behavior, and I am not sure what benefit it would
>> have anyway. ...
>
> If you can imagine the benefit of waiting for multiple kernel objects
> you can also imagine the benefit of waiting multiple kernel objects
> where at least one object is an IOCP.

You should send some emails to Microsoft. Be double sure to show them
how you behave here...

>
>> https://learn.microsoft.com/en-us/windows/win32/api/synchapi/nf-synchapi-waitformultipleobjects
>> ________________
>> When bWaitAll is TRUE, the function's wait operation is completed only
>> when the states of all objects have been set to signaled. The function
>> does not modify the states of the specified objects until the states
>> of all objects have been set to signaled. For example, a mutex can be
>> signaled, but the thread does not get ownership until the states of
>> the other objects are also set to signaled. In the meantime, some
>> other thread may get ownership of the mutex, thereby setting its state
>> to nonsignaled.
>> ________________
>
> You can probably just as easily imagine that I don't mean the case
> where we wait for all objects to signal, but only one of them. So
> I don't understand why you're so misunderstanding what I said.

Re: A Java- / .NET-like monitor

<uk371f$3utkg$2@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!news.nntp4.net!news.gegeweb.eu!gegeweb.org!eternal-september.org!feeder3.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: A Java- / .NET-like monitor
Date: Mon, 27 Nov 2023 14:59:59 -0800
Organization: A noiseless patient Spider
Lines: 21
Message-ID: <uk371f$3utkg$2@dont-email.me>
References: <uig7jl$1l4v0$1@raubtier-asyl.eternal-september.org>
<20231118205852.379@kylheku.com>
<ujc8ad$3n2sv$1@raubtier-asyl.eternal-september.org>
<20231118220242.793@kylheku.com>
<ujcq5b$3pgf8$2@raubtier-asyl.eternal-september.org>
<ujdq0m$3u8mv$7@dont-email.me>
<ujfj9t$admf$1@raubtier-asyl.eternal-september.org>
<ujgeu8$evq1$1@dont-email.me>
<ujht1s$p85k$1@raubtier-asyl.eternal-september.org>
<ujpctk$27892$2@dont-email.me>
<ujpkul$28aoq$2@raubtier-asyl.eternal-september.org>
<ujpq0f$28srl$6@dont-email.me>
<ujqotn$2dtfl$1@raubtier-asyl.eternal-september.org>
<ujrce8$2gjhg$4@dont-email.me>
<ujsnr8$2prnc$1@raubtier-asyl.eternal-september.org>
<ujtuku$2v76e$5@dont-email.me>
<ujv727$37tp2$1@raubtier-asyl.eternal-september.org>
<uk0lb3$3er0k$1@dont-email.me>
<uk15l9$3knut$2@raubtier-asyl.eternal-september.org>
<uk1cj3$3li7q$2@dont-email.me>
<uk1i4n$3m9qq$1@raubtier-asyl.eternal-september.org>
<uk1jv5$3mhgq$1@dont-email.me>
<uk1kah$3mkqg$1@raubtier-asyl.eternal-september.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 27 Nov 2023 22:59:59 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="0cb77dcc24e2a1d3ec41353ca82b05d6";
logging-data="4159120"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/ms5cZJJLkOFdw6/02tUlj5yOPW9MrJ+w="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:JSvQ65EF6XPq16n6ZS0rNey9as8=
In-Reply-To: <uk1kah$3mkqg$1@raubtier-asyl.eternal-september.org>
Content-Language: en-US
 by: Chris M. Thomasson - Mon, 27 Nov 2023 22:59 UTC

On 11/27/2023 12:34 AM, Bonita Montero wrote:
> Am 27.11.2023 um 09:28 schrieb Chris M. Thomasson:
>
>> On 11/26/2023 11:57 PM, Bonita Montero wrote:
>
>>> I told you twice that this would make sense if you additionally would
>>> wait for some other waitable kernel objects. If the IOCP is signalled
>>> you'd do an additional GQCS() on the IOCP. This actually works with
>>> Windows 11 and it would be nice if MS would document since which Win-
>>> dows version it is safe to have a WFMO() on a IOCP.
>
>> This is undocumented behavior, and I am not sure what benefit it would
>> have anyway. ...
>
> If you can imagine the benefit of waiting for multiple kernel objects
> you can also imagine the benefit of waiting multiple kernel objects
> where at least one object is an IOCP.
[...]

No need for it at all. Well, at least is none of my server work.

Re: A Java- / .NET-like monitor

<uk37ts$3utkg$3@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.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: A Java- / .NET-like monitor
Date: Mon, 27 Nov 2023 15:15:08 -0800
Organization: A noiseless patient Spider
Lines: 58
Message-ID: <uk37ts$3utkg$3@dont-email.me>
References: <uig7jl$1l4v0$1@raubtier-asyl.eternal-september.org>
<CS66N.35203$cAm7.7747@fx18.iad> <Tb86N.7506$xeV4.1209@fx45.iad>
<20231118122549.392@kylheku.com> <20231124011442.00004937@yahoo.com>
<ujpcnq$27892$1@dont-email.me>
<ujpl4m$28aoq$4@raubtier-asyl.eternal-september.org>
<ujppo2$28srl$5@dont-email.me> <bL38N.65219$cAm7.33028@fx18.iad>
<20231124102842.71@kylheku.com>
<ujsobk$2ps2p$1@raubtier-asyl.eternal-september.org>
<20231125100947.641@kylheku.com> <%Wr8N.40010$zh16.35086@fx48.iad>
<20231126012940.00001397@yahoo.com> <ujvf5l$3934n$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 27 Nov 2023 23:15:08 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="0cb77dcc24e2a1d3ec41353ca82b05d6";
logging-data="4159120"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+xtPd7maODkV8bfgX8BNxFATyfiAU4i+Y="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:xQJtyMWliYmzncZP72dyywQPDRo=
In-Reply-To: <ujvf5l$3934n$1@dont-email.me>
Content-Language: en-US
 by: Chris M. Thomasson - Mon, 27 Nov 2023 23:15 UTC

On 11/26/2023 4:54 AM, David Brown wrote:
> On 26/11/2023 00:29, Michael S wrote:
>> On Sat, 25 Nov 2023 19:30:03 GMT
>> scott@slp53.sl.home (Scott Lurndal) wrote:
>>
>>> Kaz Kylheku <864-117-4973@kylheku.com> writes:
>>>> On 2023-11-25, Bonita Montero <Bonita.Montero@gmail.com> wrote:
>>>>> Am 24.11.2023 um 19:33 schrieb Kaz Kylheku:
>>>>>> It's just a syntactic sugar to avoid forgetting to unlock ...
>>>>>
>>>>> RAII is magnitudes more convenient and lass error-prone
>>>>> than manual resource handling.
>>>>
>>>> Sure, but that's not necessarily an effective way to "sell" it to
>>>> someone who is being skeptical.
>>>
>>> I would argue that is is not 'less error-prone' than
>>> explicit locking, properly written and unit tested.
>>
>> RAII is horrible, but unfortunately necessary in big undisciplined C++
>> projects.
>> The root bug in C++ language design are constructors that can fail, but
>> can't return error code.
>
> That's easily solved in cases like this - write constructors that can't
> fail.
>
> In the kind of systems I work with, something like acquiring a mutex
> cannot fail unless there is a major system failure that renders it
> unsafe to run anything - the system then turns off all the machinery it
> controls, logs everything it can, and alerts the user to the failure.
> That applies equally to a free-standing "lock" function or an RAII
> constructor solution.  There is no need for exceptions, error codes, or
> anything of that sort.
>
>> That problem begot exceptions. And the presence of exceptions begot
>> RAII. RAII is bad, but less bad than other solutions.
>>
>
> I am not a fan of exceptions in low-level code or control code.  They
> are fine in high-level PC stuff when dealing with things that can
> reasonably fail but where you don't want to bother with all the details
> all the time - such as a constructor for opening a handle to a database.
>  (I mostly use Python for that kind of thing anyway, but that's just
> personal choice.)
>

> Once you stop thinking that code can fail, and write code that doesn't
> fail, it all becomes much easier,

Amen. :^)

> and RAII is just another useful tool.
> (And you can compile with exceptions fully disabled.)
>

Re: A Java- / .NET-like monitor

<uk3855$3utkg$4@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.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: A Java- / .NET-like monitor
Date: Mon, 27 Nov 2023 15:19:01 -0800
Organization: A noiseless patient Spider
Lines: 22
Message-ID: <uk3855$3utkg$4@dont-email.me>
References: <uig7jl$1l4v0$1@raubtier-asyl.eternal-september.org>
<uj1jli$1kdmu$1@raubtier-asyl.eternal-september.org>
<88V5N.33567$Ee89.15971@fx17.iad>
<uj99na$35s1q$1@raubtier-asyl.eternal-september.org>
<CS66N.35203$cAm7.7747@fx18.iad> <Tb86N.7506$xeV4.1209@fx45.iad>
<ujc4la$3mjh0$1@raubtier-asyl.eternal-september.org>
<20231118205852.379@kylheku.com>
<ujc8ad$3n2sv$1@raubtier-asyl.eternal-september.org>
<20231118220242.793@kylheku.com>
<ujcq5b$3pgf8$2@raubtier-asyl.eternal-september.org>
<ujdq0m$3u8mv$7@dont-email.me>
<ujfj9t$admf$1@raubtier-asyl.eternal-september.org>
<ujgeu8$evq1$1@dont-email.me>
<ujht1s$p85k$1@raubtier-asyl.eternal-september.org>
<ujpctk$27892$2@dont-email.me>
<ujpkul$28aoq$2@raubtier-asyl.eternal-september.org>
<ujpq0f$28srl$6@dont-email.me>
<ujqotn$2dtfl$1@raubtier-asyl.eternal-september.org>
<ujrce8$2gjhg$4@dont-email.me>
<ujsnr8$2prnc$1@raubtier-asyl.eternal-september.org>
<ujtuku$2v76e$5@dont-email.me>
<ujv727$37tp2$1@raubtier-asyl.eternal-september.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 27 Nov 2023 23:19:01 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="0cb77dcc24e2a1d3ec41353ca82b05d6";
logging-data="4159120"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/kC1VNUsKg5545mcBQz57gb6QdwuWTnZk="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:/CGSQUtkxMI/6ZhTb5G62h5i3lM=
In-Reply-To: <ujv727$37tp2$1@raubtier-asyl.eternal-september.org>
Content-Language: en-US
 by: Chris M. Thomasson - Mon, 27 Nov 2023 23:19 UTC

On 11/26/2023 2:35 AM, Bonita Montero wrote:
> Am 26.11.2023 um 00:06 schrieb Chris M. Thomasson:
>
>> Huh? Drill down on that. What do you mean wrt "_after_ you waited"?
>
> If you want to wait mor than on the IOCP itself you could use WFMO
> and if the IOCP was signalled GQCS afterwards. With an IOCP you can
> wait only for the IOCP and maybe an alert if you use GQCSE.
>
>> So your hack can break at any time? ...
>
> It would be nice if MS would document since when this works.
>
>> So your hack can break at any time? Keep in mind that I said GQCSEX...
>> :^) Its more efficient that GQCS. ...
>
> It's not about the efficiency but that you could be signalled other
> waitable kernel objects also.
>

God knows what WFMO is going to do to that IOCP handle. It could break
things at a lower level of logic.

Re: A Java- / .NET-like monitor

<uk38fg$3v44n$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.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: A Java- / .NET-like monitor
Date: Mon, 27 Nov 2023 15:24:32 -0800
Organization: A noiseless patient Spider
Lines: 32
Message-ID: <uk38fg$3v44n$1@dont-email.me>
References: <uig7jl$1l4v0$1@raubtier-asyl.eternal-september.org>
<uiv50o$14quu$1@raubtier-asyl.eternal-september.org>
<WcM4N.53198$svP4.12968@fx12.iad>
<uj04oh$19j9e$1@raubtier-asyl.eternal-september.org>
<mZM4N.10239$rx%7.6902@fx47.iad> <uj0l38$1ch3f$1@dont-email.me>
<uj1j2q$1kad4$2@raubtier-asyl.eternal-september.org>
<uj38g6$1skku$2@dont-email.me>
<uj40j0$23vlu$1@raubtier-asyl.eternal-september.org>
<gaq5N.25378$cAm7.15892@fx18.iad>
<uj5ih0$2booh$1@raubtier-asyl.eternal-september.org>
<_ys5N.12946$ayBd.1996@fx07.iad>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 27 Nov 2023 23:24:32 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="0cb77dcc24e2a1d3ec41353ca82b05d6";
logging-data="4165783"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18QH1BE0WqB/vCXW5VwVkrGEJX1aD3NAcs="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:3bbqpVutYrogvZboCyPLGPO/adU=
Content-Language: en-US
In-Reply-To: <_ys5N.12946$ayBd.1996@fx07.iad>
 by: Chris M. Thomasson - Mon, 27 Nov 2023 23:24 UTC

On 11/16/2023 9:45 AM, Scott Lurndal wrote:
> Bonita Montero <Bonita.Montero@gmail.com> writes:
>> Am 16.11.2023 um 16:02 schrieb Scott Lurndal:
>>> Bonita Montero <Bonita.Montero@gmail.com> writes:
>>>> Am 15.11.2023 um 21:08 schrieb Chris M. Thomasson:
>>>>
>>>>> Are you sure its 100% atomic for use in multi-thread sync algorithms?
>>>>
>>>> If MSVC generates that code it's atomic.
>>>
>>> No, if Intel architecture documentation specifies that it is
>>> single-copy atomic, then it is single-copy atomic.
>>
>> MSVC relies for sure on the right behaviour.
>
> Right. Keep thinking that.
>
>>
>>> MSVC is just a poor-to-middling C compiler.
>>
>> MSVC has the strongest C++20-conformance but the weakest optimizer.
>
> Faint praise, indeed. Nobody other than Herb cares about C++20 conformance.

;^D Sutters mill...

>
> Most real world C++ code relies on C++11 for portability. Most
> of our systems and our customers systems don't even support C++17.
>

Re: A Java- / .NET-like monitor

<uk46te$6kkq$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!rocksolid2!news.neodome.net!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.lang.c++
Subject: Re: A Java- / .NET-like monitor
Date: Tue, 28 Nov 2023 09:03:58 +0100
Organization: A noiseless patient Spider
Lines: 42
Message-ID: <uk46te$6kkq$1@dont-email.me>
References: <uig7jl$1l4v0$1@raubtier-asyl.eternal-september.org>
<CS66N.35203$cAm7.7747@fx18.iad> <Tb86N.7506$xeV4.1209@fx45.iad>
<20231118122549.392@kylheku.com> <20231124011442.00004937@yahoo.com>
<ujpcnq$27892$1@dont-email.me>
<ujpl4m$28aoq$4@raubtier-asyl.eternal-september.org>
<ujppo2$28srl$5@dont-email.me> <bL38N.65219$cAm7.33028@fx18.iad>
<20231124102842.71@kylheku.com>
<ujsobk$2ps2p$1@raubtier-asyl.eternal-september.org>
<20231125100947.641@kylheku.com> <%Wr8N.40010$zh16.35086@fx48.iad>
<20231126012940.00001397@yahoo.com> <ujvf5l$3934n$1@dont-email.me>
<uk37ts$3utkg$3@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 28 Nov 2023 08:03:58 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="996151d422c4315b4e59cd5151e21d6f";
logging-data="217754"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/B7hXaIO4I5I4aYsxvolMnBYZlmphHh7I="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.11.0
Cancel-Lock: sha1:T8NeeEkxofKzjkMo5YX7bM1IsZ8=
In-Reply-To: <uk37ts$3utkg$3@dont-email.me>
Content-Language: en-GB
 by: David Brown - Tue, 28 Nov 2023 08:03 UTC

On 28/11/2023 00:15, Chris M. Thomasson wrote:
> On 11/26/2023 4:54 AM, David Brown wrote:

>
>> Once you stop thinking that code can fail, and write code that doesn't
>> fail, it all becomes much easier,
>
> Amen. :^)

It would probably have been better to say "Once you stop thinking that
code always has the possibility of failure, you can start writing code
that cannot fail." Code can still fail - you might have made a mistake
in the code. But then it is /your/ fault, as the programmer - take
responsibility for that, don't punt it down the line as an exception to
the innocent programmer that calls your function.

If it is inevitable that your function might not be able to do its main
job - it's trying to read a file that might not exist, or connect to a
database that might not be online - make such failures explicitly part
of the specification of the function.

Maybe you think exceptions are the best way to communicate such
failures. Then your specification is "This function reads the file and
returns its contents, or throws a FileNotAccessible exception". The
real trouble with the whole concept of exceptions is that people think
they mean you can specify the function as "This function reads the file
and returns its contents", and that somehow exceptions magically fix any
failures, or that code further up the food chain can compensate for the
problem - and no one takes responsibility. Error code return can be
ugly, and std::expected<> returns can mean changing lots of code along
the way, but these make the failures /explicit/ - you have to keep
looking at them until you deal with them. They are part of the
specification of the code, not an afterthought that magically floats
around until it gets swept under the carpet.

>
>
>> and RAII is just another useful tool. (And you can compile with
>> exceptions fully disabled.)
>>
>

Re: A Java- / .NET-like monitor

<uk5s6q$f83j$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.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: A Java- / .NET-like monitor
Date: Tue, 28 Nov 2023 15:13:30 -0800
Organization: A noiseless patient Spider
Lines: 26
Message-ID: <uk5s6q$f83j$1@dont-email.me>
References: <uig7jl$1l4v0$1@raubtier-asyl.eternal-september.org>
<88V5N.33567$Ee89.15971@fx17.iad>
<uj99na$35s1q$1@raubtier-asyl.eternal-september.org>
<CS66N.35203$cAm7.7747@fx18.iad> <Tb86N.7506$xeV4.1209@fx45.iad>
<ujc4la$3mjh0$1@raubtier-asyl.eternal-september.org>
<20231118205852.379@kylheku.com>
<ujc8ad$3n2sv$1@raubtier-asyl.eternal-september.org>
<20231118220242.793@kylheku.com>
<ujcq5b$3pgf8$2@raubtier-asyl.eternal-september.org>
<ujdq0m$3u8mv$7@dont-email.me>
<ujfj9t$admf$1@raubtier-asyl.eternal-september.org>
<ujgeu8$evq1$1@dont-email.me>
<ujht1s$p85k$1@raubtier-asyl.eternal-september.org>
<ujpctk$27892$2@dont-email.me>
<ujpkul$28aoq$2@raubtier-asyl.eternal-september.org>
<ujpq0f$28srl$6@dont-email.me>
<ujqotn$2dtfl$1@raubtier-asyl.eternal-september.org>
<ujrce8$2gjhg$4@dont-email.me>
<ujsnr8$2prnc$1@raubtier-asyl.eternal-september.org>
<ujtuku$2v76e$5@dont-email.me>
<ujv727$37tp2$1@raubtier-asyl.eternal-september.org>
<uk3855$3utkg$4@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 28 Nov 2023 23:13:30 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="006e444d818f21252b0f99133d5837bc";
logging-data="499827"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/amvf8vIymSdskXqbpys6mzn95y9i6DaQ="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:IFI7jNEbXlT+NHErwjSN1xxYDuQ=
Content-Language: en-US
In-Reply-To: <uk3855$3utkg$4@dont-email.me>
 by: Chris M. Thomasson - Tue, 28 Nov 2023 23:13 UTC

On 11/27/2023 3:19 PM, Chris M. Thomasson wrote:
> On 11/26/2023 2:35 AM, Bonita Montero wrote:
>> Am 26.11.2023 um 00:06 schrieb Chris M. Thomasson:
>>
>>> Huh? Drill down on that. What do you mean wrt "_after_ you waited"?
>>
>> If you want to wait mor than on the IOCP itself you could use WFMO
>> and if the IOCP was signalled GQCS afterwards. With an IOCP you can
>> wait only for the IOCP and maybe an alert if you use GQCSE.
>>
>>> So your hack can break at any time? ...
>>
>> It would be nice if MS would document since when this works.
>>
>>> So your hack can break at any time? Keep in mind that I said
>>> GQCSEX... :^) Its more efficient that GQCS. ...
>>
>> It's not about the efficiency but that you could be signalled other
>> waitable kernel objects also.
>>
>
> God knows what WFMO is going to do to that IOCP handle. It could break
> things at a lower level of logic.

Nt 4.0 source code is out there. Humm... So, you should dig into it and
see what happens to IOCP if you pass its handle to WFMO...

Re: A Java- / .NET-like monitor

<uk5tb5$f83j$2@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.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: A Java- / .NET-like monitor
Date: Tue, 28 Nov 2023 15:32:52 -0800
Organization: A noiseless patient Spider
Lines: 22
Message-ID: <uk5tb5$f83j$2@dont-email.me>
References: <uig7jl$1l4v0$1@raubtier-asyl.eternal-september.org>
<20231108100351.347@kylheku.com>
<uigk5o$1nmku$1@raubtier-asyl.eternal-september.org>
<20231108114723.256@kylheku.com>
<uigp4n$1onpc$1@raubtier-asyl.eternal-september.org>
<20231108152102.495@kylheku.com>
<uihnei$21tq7$1@raubtier-asyl.eternal-september.org>
<uihnkd$21rae$1@dont-email.me>
<uihnnm$21tq7$5@raubtier-asyl.eternal-september.org>
<uihnup$21rab$4@dont-email.me>
<uihpgl$227kv$1@raubtier-asyl.eternal-september.org>
<nuT3N.20309$wvv7.18517@fx14.iad>
<uipl56$3sugf$1@raubtier-asyl.eternal-september.org>
<20231111205536.387@kylheku.com> <E5e4N.6986$Ubzd.3639@fx36.iad>
<20231112203949.483@kylheku.com> <6nB4N.2145$qqwd.2132@fx42.iad>
<20231113191446.974@kylheku.com> <0mV4N.683$%d2c.644@fx08.iad>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 28 Nov 2023 23:32:53 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="006e444d818f21252b0f99133d5837bc";
logging-data="499827"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1++80GLSWZNS79bLURI9ji+Iq0aw4GvzdU="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:Y4b4JgCm+DIacHqFH08oD1Ot41s=
Content-Language: en-US
In-Reply-To: <0mV4N.683$%d2c.644@fx08.iad>
 by: Chris M. Thomasson - Tue, 28 Nov 2023 23:32 UTC

On 11/14/2023 5:42 PM, Pavel wrote:
> Kaz Kylheku wrote:
>> On 2023-11-14, Pavel <pauldontspamtolk@removeyourself.dontspam.yahoo>
>> wrote:
>>> "as-if" and "according to the scheduling policy (if applicable)" here
>>> are important. The standard intent may be to permit only the threads
>>> that are "unblocked" contend for the mutex -- as opposed to all
>>> non-blocked threads.
>>
>> It's possible that only one thread is unblocked by a
>> pthread_cond_signal. It takes at least two parties to contend for
>> something.
>>
> My point was that the "unblocked" thread could be the thread that "won"
> the contention. "as-if" there meant that the threads didn't really need
> to be all woken up / unblocked and start contending; but the contention
> could be resolved according to the scheduling policy (the same one that
> would be applied if they were actually running and contending for the
> mutex, without any waiting for the condvar) within the signal call.

The flexibility of the API allows us to signal inside and/or outside of
a locked mutex region. So, whats the problem?


devel / comp.lang.c++ / Re: A Java- / .NET-like monitor

Pages:1234567891011
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor