Boost logo

Boost :

From: Gavin Lambert (boost_at_[hidden])
Date: 2023-06-01 02:02:48


On 1/06/2023 06:42, Christian Mazakas wrote:
> Unordered's concurrent flat map

Which is where, exactly? It does not appear to currently exist in the
library as far as I can tell, not even in develop...

> contains a hand-rolled
> spinlock (graciously provided by Peter Dimov) but it contains
> a dependency on SmartPtr for the following two headers:
>
> #include <boost/smart_ptr/detail/sp_thread_pause.hpp>
> #include <boost/smart_ptr/detail/sp_thread_sleep.hpp>
>
> I advocate that we move these to Core. They're small, self-contained
> and are useful in broader contexts.

Is there some reason why the spinlock itself shouldn't also be in Core,
in that case?

Or perhaps Boost.Compat should get a std::shared_mutex equivalent for
this purpose instead?

I dislike libraries bypassing the standard library for this sort of
thing, as it makes it harder to deal with platform quirks or reason
about blocking in latency-sensitive code.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk