(svn r27178) -Fix [FS#5969]: Data race due to lazy initialisation of objects.

This commit is contained in:
frosch
2015-03-07 18:27:01 +00:00
parent e77de93636
commit 780e595933
11 changed files with 48 additions and 36 deletions

View File

@@ -21,6 +21,13 @@
LinkGraphJobPool _link_graph_job_pool("LinkGraphJob");
INSTANTIATE_POOL_METHODS(LinkGraphJob)
/**
* Static instance of an invalid path.
* Note: This instance is created on task start.
* Lazy creation on first usage results in a data race between the CDist threads.
*/
/* static */ Path *Path::invalid_path = new Path(INVALID_NODE, true);
/**
* Create a link graph job from a link graph. The link graph will be copied so
* that the calculations don't interfer with the normal operations on the