开发者

BGL concurrent read accesses problem

I need to iterate over the vertices and edges of a BGL adjacency_list from several threads. Which would be an efficient way to d开发者_JS百科o that, provided that the graph is large (mutex..)?

The BGL methods don't support reentrant calls?


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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜