Question

I need to iterate over the vertices and edges of a BGL adjacency_list from several threads. Which would be an efficient way to do that, provided that the graph is large (mutex..)?

The BGL methods don't support reentrant calls?

Was it helpful?

Solution

BGL is currently not thread safe. Take a look at MTGL which provides a BGL like interface but is designed for massively multithreaded platforms.

OTHER TIPS

As long as you aren't modifying the graph structure, multiple concurrent reads are safe; updates and writes to properties require locking. The page that was linked is about algorithms running in parallel, which they currently don't in plain BGL.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top