package core import "sync" // CompileAllFunctions starts a goroutine for each function compilation and waits for completion. func CompileAllFunctions(functions map[string]*Function) { wg := sync.WaitGroup{} for _, function := range functions { wg.Add(1) go func() { defer wg.Done() function.Compile() }() } wg.Wait() }