英文: How to write a better two channel select 问题 在以下代码中,有两个通道A和B,它们包含工作任务。在实际代码中,它们是不同的结构体。工作者需要在退出之前...
使用`make`进行并发内存分配?
英文: concurrent memory allocation using `make`? 问题 我打算读取一个大型的CSV文件,并返回一个结构体数组。因此,我决定将大文件拆分成多个每个文件包含10...
如何检查 goroutine 是否成功创建?
英文: How do I check if a goroutine is created successfully? 问题 在Go语言中,go是用来创建一个goroutine的关键字。然而,它似乎不返...
如何调整用于下载N个文件的goroutine数量?
英文: How to tune the number of goroutines used to download N files? 问题 我正在制作一个 Golang 程序,需要下载 N 个文件,然...
在Go程序中,有三个后台goroutine。
英文: What are the three background goroutines in a Go program? 问题 Go似乎始终至少有4个goroutine在任何给定时间运行。其他三个不...
Goroutine能像Erlang一样透明地在多个主机上生成进程吗?
英文: Can goroutine like erlang spawn process across multiple hosts transparently? 问题 据说,如果配置了erlang的c...
How do goroutines work?
英文: How do goroutines work? 问题 我正在为你翻译以下内容: 我正在按照Go Tour的教程学习,但在使用goroutines时遇到了一些困难。我知道goroutines非常...
两个例程在同一个通道上进行通信
英文: Two routines communicating on the same channel 问题 我有一个函数,给定一个切片和一个数组,它会逐个将切片的元素发送到通道中。 Playgroun...
可以使用活动的goroutine退出程序吗?
英文: OK to exit program with active goroutine? 问题 以下是代码的翻译: func main() { ch := make(chan int) quit :...
当数据通道关闭时,Goroutines不会退出。
英文: Goroutines not exiting when data channel is closed 问题 我正在尝试跟随在http://blog.golang.org/pipelines/b...
70