C++ Logo

std-proposals

Advanced search

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

From: Ted Lyngmo <ted_at_[hidden]>
Date: Wed, 1 Oct 2025 20:59:46 +0200
2025-09-10 17:38, Ted Lyngmo:
> 2025-09-08 08:06, Tiago Freire:
> >
> > multi_lock?
>
> Not bad! I could absolutely live with that name!

I've thought about the proposals for a good name a lot and I think
Tiago's is the one I like the most.

    one mutex 0-many mutexes description
+---------------+---------------+-----------------+
| lock_guard | scoped_lock | always owning |
+---------------+---------------+-----------------+
| unique_lock | multi_lock | (*) |
+---------------+---------------+-----------------+

(*) deferred locking, time-constrained attempts at locking, recursive
locking, transfer of lock ownership.

What do you think? I have had a hard time rewriting the proposal because
the actual name is bothering me :-)

`std::multi_lock`, yay or nay?

Best regards,
Ted Lyngmo

Ps.
On a sidenote: I have supplied an implementation of the proposal that
came before P3833, namely P3832R0 Timed lock algorithms for multiple
lockables, to the Beman project:
https://github.com/bemanproject/timed_lock_alg

Received on 2025-10-01 18:59:53