Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c++ > #81479

Re: condvar-implementation

From "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com>
Newsgroups comp.lang.c++
Subject Re: condvar-implementation
Date 2021-09-23 10:28 -0700
Organization Aioe.org NNTP Server
Message-ID <siidgb$t2e$1@gioia.aioe.org> (permalink)
References (3 earlier) <sidolg$14i7$1@gioia.aioe.org> <sig0m0$1nni$1@gioia.aioe.org> <sigv5v$cad$1@dont-email.me> <sih313$u2a$1@gioia.aioe.org> <qvX2J.31504$6u6.7496@fx03.iad>

Show all headers | View raw


On 9/23/2021 2:09 AM, Branimir Maksimovic wrote:
> On 2021-09-23, Chris M. Thomasson <chris.m.thomasson.1@gmail.com> wrote:
>> On 9/22/2021 9:18 PM, Bonita Montero wrote:
>>> Am 22.09.2021 um 21:37 schrieb Chris M. Thomasson:
>>>> On 9/21/2021 4:08 PM, Chris M. Thomasson wrote:
>>>>> On 9/21/2021 4:24 AM, Bonita Montero wrote:
>>>>>> Am 21.09.2021 um 00:52 schrieb Chris M. Thomasson:
>>>>>>
>>>>>>> Creating a working condvar can be very tricky. Have you
>>>>>>> tried to runĀ  your implementation through a race detector? ...
>>>>>>
>>>>>> Can you read ? I haven't built a condvar but a monitor-object.
>>>>
>>>> Also, can you read the subject of this thread: "condvar-implementation" ?
>>>>
>>>>
>>>>>
>>>>> I answered the part where you wrote:
>>>>>
>>>>> Bonita: But I'm still interested in the paper which describes the
>>>>> different approaches in implementing a condvar for Win32. Maybe I can
>>>>> implement some improvemehts here also.
>>>>>
>>>>> You snipped it out.
>>>
>>> You were referring to what I implemented so far.
>>> And this wasn't a condvar.
>>>
>>
>> Its been a while Bonita. Heck, last time I used a monitor was WAY back
>> when I was forced to work on some damn Java code, grrr. I was able to do
>> the work, but did not really, "enjoy" it so to speak, argh.
>>
>> Actually, you are making me think back to a god damn horror show I had
>> to debug where it turned out that somebody thought it was a good idea to
>> use a condvar, with more than one mutex! My GOD!
> You can implement condvar via semaphore easilly and Windows has semaphores...
> Think about it...

Well... Humm... Way back, a lot of people had condvar impls that are 
totally foobar. Not POSIX compliant and, iirc, a lot of them suffered 
from the dreaded "lost wakeup" syndrome, from time to time... Afaict, 
the really easy way is to use explicit waitsets. However, they have 
scheduling issues, sort of bound to SCHED_OTHER...

Back to comp.lang.c++ | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

condvar-implementation Bonita Montero <Bonita.Montero@gmail.com> - 2021-09-20 20:44 +0200
  Re: condvar-implementation scott@slp53.sl.home (Scott Lurndal) - 2021-09-20 19:54 +0000
  Re: condvar-implementation "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2021-09-20 15:52 -0700
    Re: condvar-implementation Bonita Montero <Bonita.Montero@gmail.com> - 2021-09-21 13:24 +0200
      Re: condvar-implementation "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2021-09-21 16:08 -0700
        Re: condvar-implementation "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2021-09-22 12:37 -0700
          Re: condvar-implementation Bonita Montero <Bonita.Montero@gmail.com> - 2021-09-23 06:18 +0200
            Re: condvar-implementation "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2021-09-22 22:23 -0700
              Re: condvar-implementation Branimir Maksimovic <branimir.maksimovic@gmail.com> - 2021-09-23 09:09 +0000
                Re: condvar-implementation "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2021-09-23 10:28 -0700
              Re: condvar-implementation Bonita Montero <Bonita.Montero@gmail.com> - 2021-09-23 19:06 +0200
            Re: condvar-implementation Branimir Maksimovic <branimir.maksimovic@gmail.com> - 2021-09-23 09:07 +0000
              Re: condvar-implementation Bonita Montero <Bonita.Montero@gmail.com> - 2021-09-23 19:07 +0200
      Re: condvar-implementation "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2021-09-21 16:33 -0700

csiph-web