- 博客(1)
- 资源 (1)
- 收藏
- 关注
原创 go多线程实现
package mainimport "fmt"import "time"//工作线程,处理具体的业务逻辑,是将jobs中的任务取出,处理后将处理结果放置在results中。func worker(id int, jobs <-chan int, results chan<- int) { for j := range jobs { fmt.Println...
2018-07-11 14:27:57
959
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人