摘要:
package main import ( "fmt" "sync" ) type object interface{} type Set struct { m map[object]bool sync.RWMutex //线程安全实现,记录下 } //初始化 func New() *Set { return &Set{ m: map... 阅读全文
posted @ 2019-05-17 17:18
wujf
阅读(875)
评论(0)
推荐(0)
摘要:
方式一 方式二 阅读全文
posted @ 2019-05-17 16:19
wujf
阅读(6174)
评论(0)
推荐(0)
摘要:
package main import ( "fmt" "math/rand" ) func main() { ch := make(chan int) done := make(chan bool) f := make(chan bool) go func() { for { select { ... 阅读全文
posted @ 2019-05-17 16:17
wujf
阅读(521)
评论(0)
推荐(0)

浙公网安备 33010602011771号