C++ Logo

std-proposals

Advanced search

Re: [std-proposals] P3833R0a - std::unique_multilock

From: Ted Lyngmo <ted_at_[hidden]>
Date: Mon, 8 Sep 2025 21:42:38 +0200
Den 2025-09-08 kl. 20:31, skrev Ted Lyngmo:
> > Example with 30 shared_timed_mutexes -> 30 shared_locks -> 1
> > unique_multilock (which makes the unique_multilock a
> > _SharedTimedLockable_ itself):
>
> Sorry, that will make it a _TimedLockable_ itself. / Ted

And forget about this:> I think using a `std::shared_mutex`/
> `std::shared_timed_mutex` rather than a `std::shared_lock` with it
> will be more common, but sure, you can stack them.

You'd use `shared_lock` wrappers if you want the `unique_multilock` to
provide shared locking for _SharedLockable_s of course.

Br,
Ted

Received on 2025-09-08 19:42:37