C++ Logo

std-proposals

Advanced search

Re: Slim mutexes and locks based on C++20 std::atomic::wait

From: Thiago Macieira <thiago_at_[hidden]>
Date: Mon, 30 Aug 2021 09:17:44 -0700
On Monday, 30 August 2021 06:48:33 PDT Ville Voutilainen via Std-Proposals
wrote:
> > C++ as a standard assiduously *avoids* defining the size of anything.
> > A byte is defined as being of size 1, but even that doesn't require
> > that it be precisely 8 bits.
>
> Sure, but the reason to standardize this type is that it's designed to
> be portably very small,
> whereas std::mutex isn't.

I don't think the standard can do that. It's possible on some platforms that
have no recourse to something better, that it's just a wrapper around
std::mutex.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel DPG Cloud Engineering

Received on 2021-08-30 11:17:51