views:

100

answers:

1

Hi!

I'd like multiple threads to use the dijkstra_shortest_paths and astar_search functions of the BGL, and then read the property maps of the result vertices and edges.

I'm wondering wether I should use mutexes to ensure thread-safety.

So here are my questions:

1., Are the dijkstra_shortest_paths and astar_search functions of the Boost.Graph thread safe?

2., If I only try to read the property maps of the graph from multiple threads, do I need to worry about thread safety?

+1  A: 

Property maps and the BGL are not thread-safe as of now. For reference see this post.

ablaeul
Take a look at Parallel BGL (PBGL), it can run as multiple processes on a single host (via MPI). http://www.boost.org/doc/libs/1_43_0/libs/graph_parallel/
spenthil