C++ Logo


Advanced search

Re: [SG5] [isocpp-ext] Feedback on P1875/P2066: Transactional Memory Lite TS

From: Hans Boehm <boehm_at_[hidden]>
Date: Wed, 25 Aug 2021 11:47:40 -0700
Thanks for the comments and fixes!

On Tue, Aug 24, 2021 at 8:04 AM Jens Maurer via Ext <ext_at_[hidden]>

> On 28/07/2021 05.46, Hubert Tong wrote:
> > Question about the design:
> >
> > Has there been any indication that an `if consteval`-like facility would
> be useful for providing alternative implementations?
> Not addressing this one for now.
I think this is a good suggestion for future exploration. There has
already been some discussion of an "in_transaction()" test in SG5. The Aug
1, 2016 minutes contain some discussion of using it to make parallel
algorithms transaction-safe in the context of the old TS. And it's clearly
something we want people to experiment with. But I think it's not something
we want to require in an initial minimal TS.

The parallel algorithms would probably be a poster child use case for such
a facility. You would often want to avoid thread-based parallelism if such
an algorithm is invoked from a transaction not implemented via a single
global lock. But simple implementations still wouldn't require it. And a
query on the SG5 mailing list suggests that most people would prefer just
to add parallel algorithms to the library exclusion list for now. I expect
us to do that for the next version.


Received on 2021-08-25 13:47:55