sunty
2020-04-16 178d4b5b201755c9877bc761634863b7bf7fb465
go restart unit test
1个文件已修改
2 ■■■■■ 已修改文件
controllers/swfsControllers.go 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
controllers/swfsControllers.go
@@ -231,7 +231,9 @@
                fmt.Println("len masterIp: ", len(masterIp))
                fmt.Println("第" + strconv.Itoa(i) + "个线程")
                go Restart(masterIp[i], timeOut)
                fmt.Println("当前goroutinebe")
                waitGroup.Add(1) //每创建一个goroutine,就把任务队列中任务的数量+1
                fmt.Println("当前goroutineaf")
            }
            fmt.Println("这里为阻塞!!!!!")
            waitGroup.Wait() //.Wait()这里会发生阻塞,直到队列中所有的任务结束就会解除阻塞