On Mon, 26 Oct 2026 16:16:46 -0000 (UTC) bolt…@caprica.universe wrote:
> On Mon, 26 Oct 2026 14:41:54 GMT > sco…@slp53.sl.home (Scott Lurndal) gabbled:
> >bolt…@caprica.universe writes:
> >>C++ threading didn't have 3 level locking until 2017 making it > >>effectively useless IMO. Perhaps that was down to the lowest common > >>denominator called Windows. > >>
> > > >Mind defining your terminology? "3 level locking", in particular?
> > If you have to ask.... > > 1. No lock > 2. Write lock - Read only access, writer blocked until all readers > out of critic al section) > 3. Read-write lock - all threads other than the one in section block) >
Windows got Slim Reader/Writer Locks in Vista (2006-11) at the same time as conditional variables. 5 years before C++11. https://learn.microsoft.com/en-us/windows/win32/sync/slim-reader-writer--srw--locks Of course WinXP remained popular for few more years, approximately up until 2nd half of 2010, but that too predates publication of C++11 in 2011-09.
> This is basic stuff FFS. C++ finally got around to #2 with > shared_mutex in 2017 and its rather critical for certain algorithms. >
> >Assigning a canonical "lock number" to each lock, and failing a lock > >request for a lock with a lower number than that already held is > >a design pattern that has been around since 1980 (in Burroughs > >mainframes it was implemented in hardware). Easy enough to do > >prior to C++17 in software.
> > Thats something else entirely. >
> >And your assertion that a language that doesn't support it > >intrinsically is "useless" is ridiculous.
> > Not useless then, just less useful. >
I never ever used what you call "3 level locking", not even by mistake. But then, I don't write complicated apps on "big" computers day in day out.