Date: Thu, 25 May 2023 16:49:05 -0400
On Thu, May 25, 2023 at 4:18 PM Phil Bouchard <boost_at_[hidden]> wrote:
>
>
>
> On 5/25/23 16:12, Jason McKesson via Std-Proposals wrote:
> >
> > Um, no. That would break the performance of any number of applications
> > that don't need thread safety or have handled it properly themselves.
>
> You just turn it on or off depending on the need, defaulting to off
> obviously.
Again, no. In order to make operations on the same `std::vector<int>`
thread-safe, every such object would have to carry some kind of
mutually-exclusive payload. Therefore, every such object would have to
carry a cost. Even if we somehow standardized the ability to switch it
on and off, that would break if I used a library that had a different
setting from the one I compile for myself. Our objects wouldn't be the
same objects.
>
>
>
> On 5/25/23 16:12, Jason McKesson via Std-Proposals wrote:
> >
> > Um, no. That would break the performance of any number of applications
> > that don't need thread safety or have handled it properly themselves.
>
> You just turn it on or off depending on the need, defaulting to off
> obviously.
Again, no. In order to make operations on the same `std::vector<int>`
thread-safe, every such object would have to carry some kind of
mutually-exclusive payload. Therefore, every such object would have to
carry a cost. Even if we somehow standardized the ability to switch it
on and off, that would break if I used a library that had a different
setting from the one I compile for myself. Our objects wouldn't be the
same objects.
Received on 2023-05-25 20:49:17