Hello,
I suspect the copy_property function not to be thread safe. Remember that the issue I observe occurs when I re-use the predecessor map returned by shortest_distance. The copy_property is then called from topology/__init__.py:1441 and the parameter full is None.
Here how I think it might fail with two concurrent shortest_distance calls.
Timeline
|
time t=0 : Worker #1 executes the following statements from (graph_tool/__init__.py:2216)
| g.set_directed(True) | g.clear_filters()
time t=1 : Worker #2 executes the following statements from (graph_tool/__init__.py:2207)
| is_directed = g.is_directed() # True (as a result of worker #1)
| efilt = g.get_edge_filter() # Empty (as a result of worker #1)
| vfilt = g.get_vertex_filter() # Empty (as a result of worker #1)
time t=2 : Worker #1 continues until (graph_tool/__init__.py:2248) and set back the graph g in its original (ie. t<0) state.
| g.set_directed(is_directed)
| g.set_edge_filter(efilt[0], efilt[1])
| g.set_vertex_filter(vfilt[0], vfilt[1])
time t=3 : Worker #2 continues until (graph_tool/__init__.py:2248) and set back in its incorrect (ie. t=1) state.
Is there something I miss ?
Bests,
François.