会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
47759476
Once you get through that terrifying factual and accepting that,then every place is the center of the universe,and every moment is the most important moment and everything is the meaning of life
博客园
首页
新随笔
联系
订阅
管理
2020年11月16日
生产者消费者问题
摘要: 方法1. 用go内置的channel 代码: 主go程(main)结束,子go程随之退出。 go程相当于在进程里创建的,当主go程结束后,进程也就结束了 package main import ( "fmt" "runtime" ) func consumer(get <-chan int ){ f
阅读全文
posted @ 2020-11-16 09:26 TR_Goldfish
阅读(180)
评论(0)
推荐(0)
公告