On 6/1/23 03:15, Glen Fernandes via Boost wrote:
On Wednesday, May 31, 2023, Christian Mazakas wrote:
Unordered's concurrent flat map contains a hand-rolled spinlock (graciously provided by Peter Dimov) but it contains a dependency on SmartPtr for the following two headers:
#include
There is a better implementation in Boost.Atomic: https://github.com/boostorg/atomic/blob/2d45635e5b333f116030e3a779511d296c21...
#include
I advocate that we move these to Core. They're small, self-contained and are useful in broader contexts.
Anyone have thoughts or objections?
These are appropriate for Core. No objections from me. Andrey/Peter?
I would rather have those, along with a spin_mutex implementation, in Boost.Thread, but I realize Peter wouldn't want to depend on it in Boost.SmartPtr. Incidentally, we have a spin_mutex (with another pause implementation) in Boost.Sync. Peter, probably, wouldn't want to depend on it either, but perhaps it would be suitable for other libraries. I could start cleaning it up for a review, time permitting. Re. moving those components to Boost.Core, I don't like it, but I can be overruled.