外部控制goroutine退出

使用chan从外部控制goroutine退出。web package main import ( "fmt" "time" ) func test() { chexit := make(chan int) chforever := make(chan int) go exit(chexit) go forever(chforever) s
相关文章
相关标签/搜索