开发者

BGL concurrent read accesses problem

开发者 https://www.devze.com 2023-01-18 13:11 出处:网络
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..)?

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

精彩评论

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