优化蓝图执行器

This commit is contained in:
boyce
2025-10-30 16:00:46 +08:00
parent 21e9b2cd4b
commit 1995d91cfc
7 changed files with 40 additions and 58 deletions

View File

@@ -82,9 +82,14 @@ func (bm *Blueprint) Create(graphName string) int64 {
if graphName == "" {
return 0
}
graphID := atomic.AddInt64(&bm.seedID, 1)
bm.mapGraph[graphID] = bm.graphPool.Create(graphName, graphID)
gr := bm.graphPool.Create(graphName, graphID)
if gr == nil {
return 0
}
bm.mapGraph[graphID] = gr
return graphID
}