pgraph, lang: funcs: dage: Add an awkward graphviz interface

This refactors the code to make it not depend on the specific engine.
This commit is contained in:
James Shubin
2024-01-22 13:58:00 -05:00
parent 20c8a856a2
commit 66b826a8e1
3 changed files with 24 additions and 7 deletions

View File

@@ -1451,10 +1451,10 @@ func (obj *Engine) Stats() string {
return obj.stats.String()
}
// Graphviz writes out the diagram of a graph to be used for visualization and
// debugging. You must not modify the graph (eg: during Lock) when calling this
// method.
func (obj *Engine) Graphviz(dir string) error {
// ExecGraphviz writes out the diagram of a graph to be used for visualization
// and debugging. You must not modify the graph (eg: during Lock) when calling
// this method.
func (obj *Engine) ExecGraphviz(dir string) error {
// XXX: would this deadlock if we added this?
//obj.graphMutex.Lock() // XXX: should this be a RLock?
//defer obj.graphMutex.Unlock() // XXX: should this be an RUnlock?