feat: taskfile mutex for adding edge data

This commit is contained in:
Pete Davison
2024-04-21 19:40:26 +00:00
parent 53235f07ad
commit f75aa1f84b
2 changed files with 5 additions and 0 deletions

View File

@@ -140,6 +140,8 @@ func (r *Reader) include(node Node) error {
}
// Create an edge between the Taskfiles
r.graph.Lock()
defer r.graph.Unlock()
edge, err := r.graph.Edge(node.Location(), includeNode.Location())
if err == graph.ErrEdgeNotFound {
// If the edge doesn't exist, create it