Subject: Re: [boost] [poly_collection] Two remarks
From: Joaquin M LÃ³pez MuÃ±oz (joaquinlopezmunoz_at_[hidden])
Date: 2017-05-10 15:31:48
El 09/05/2017 a las 14:27, Dominique Devienne via Boost escribiÃ³:
> Just as Pete Bartlett mentioned, I'm also a fan of JoaquÃn's Multi-Index,
> which I'm used in production for many years as well.
> My only complaint about his proposed Poly-Collection is the fact I can't
> leverage and thus benefit from the performance of it, in a multi-index
> scenario, but as JoaquÃn already answered a few months ago, that's
> off-topic and by design, I know :)
I can't add much more to our previous conversation on this subject.
can recover that thread from
> My second remark is about parallelism. I suspect the new poly_collection
> could be used for more efficient parallel (and/or concurrent) processing
> of elements, and would be interested in examples and even a
> ::parallel_for_each() algorithm that leverages the collection's internal
> storage. And perhaps even on the write side, rather than having to make the
> whole container thread-safe, but external mutexing for example, provide
> ways for a more granular thread-safety by type or segment perhaps. Again,
> probably off topic, but hardly something you can "add from the outside" I
> think, and why I mention it here and now.
This is an interesting topic. It should be relatively easy to write a
parallel for_each that
spawns a parallel task for each segment, each of which can in its turn
on its data. I can try to play with this idea to see how it fares
As for thread safety, polymorphic containers do already have the nice
concurrent writes to different (preexisting) segments can be done safely:
I can add this info to the docs.
JoaquÃn M LÃ³pez MuÃ±oz
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk