Go 语言中的线程池(Thread Pooling in Go Programming)

用过一段时间的 Go 之后,我学会了如何使用一个不带缓存的 channel 去创建一个 goroutine 池。我喜欢这个实现,这个实现甚至比这篇博文描述的更好。虽然这样说,这篇博文仍然对它所描述的部分有一定的价值。 [https://github.com/goinggo/work](https://github.com/goinggo/work) ## 介绍(Introduction) 在我的服务器开发的职业生涯里,线程池一直是在微软系统的堆栈上构建健壮代码的关键。微软在 ....阅读全文

2018-04-13 21:41:55 gogeof
阅读:11706 评论:0

Golang 随机生成中国人姓名

package utils import ( "math/rand" "time" "fmt" ) var lastName = []string{ "赵", "钱", "孙", "李", "周", "吴", "郑", "王", "冯", "陈", "褚", "卫", "蒋", "沈", "韩", "杨", "朱", "秦", "尤", "许", "何", "吕", "施", "张", "孔", "曹", "严", "华", "金", "魏", "陶", "姜", "戚", "谢", "邹", ...阅读全文

2018.11.26 09:46 howie_鲸落
阅读:26146 评论:6