download2014711 2017-12-28 01:10
浏览 26
已采纳

在Golang中,如何使用通道处理许多goroutine

I'm thinking start 1000 goroutines at the same time using for loop in Golang.
The problem is: I have to make sure that every goroutine has been executed.
Is it possible using channels to help me make sure of that?

The structure is kinda like this:

func main {
    for i ... {
        go ...
        ch?
    ch?
}
  • 写回答

3条回答 默认 最新

      报告相同问题?

      相关推荐 更多相似问题

      悬赏问题

      • ¥20 matlab图像错误
      • ¥30 如何写通过uni.uploadFile上传图片到ASP后端接收的代码
      • ¥15 请设计一个dict,存储学生个人信息,包括姓名、年龄、电话、3科成绩,请提供一个简单的查找接口,用户按你的要求输入要查找的人,你的程序把查到的信息打印出来。
      • ¥15 selenium模糊定位
      • ¥15 硬件断点的问题,真的被整无语了
      • ¥30 想入门网络编程求建议
      • ¥15 在Vs图形库编程中引入的tools.h文件为什么不能被解析,SEL检查已经关闭(语言-c++)
      • ¥30 sentaurus三维器件仿真不收敛
      • ¥15 VB.NET的日语软键盘问题
      • ¥100 PC端 QQ联系人好友生成到电脑桌面