i have a code like this
func outerFunc (wg *sync.WaitGroup,arr []inteface){
defer wg.done
for i, data := range arr {
innerfunc(data)
}
}
func innerfunc (data inteface){
// do processing to data
debug.PrintStack()
}
func main(){
var wg sync.WaitGroup
data:= "some data"
for {
<-time.After(10* time.Second)
wg.Add(1)
outerFunc(&wg,data)
}
}
outerFunc calls innerFunc and prints and complete all of its execution in first iteration but when i call outerFunc in second iteration it get stuck at innerFunc(data) and func y’s printstack isn’t called which means innerfunc never executed and program is stuck at that point no exception and warning is thrown. is there anything i am doing ?
Note: this function is running in docker container.