![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
golang
去去golang
这个作者很懒,什么都没留下…
展开
-
golang---素数筛子算法
利用串联go channel实现,筛子算法,高并发package mainimport ( "fmt" "runtime" "runtime/debug")// 返回生成自然数序列的管道: 2, 3, 4, ...func GenerateNatural() chan int { ch := make(chan int) go func(...原创 2018-03-30 10:14:35 · 1098 阅读 · 0 评论 -
golang---rpc client连接池
rpc连接过多浪费资源,循环利用package rpcimport ( "sync")var rpcClientPoolMap map[string]*connPoolfunc init() { rpcClientPoolMap = make(map[string]*connPool)}type connPool struct { name ...原创 2018-03-30 10:17:13 · 2982 阅读 · 3 评论