立即学习:https://edu.youkuaiyun.com/course/play/192/913?utm_source=blogtoedu
Go的并发:
func run(arg string){
// ...
}
func main(){
go run("test") //启动一个一步过程,并发的单位-goroutine
...
}
goroutines示例程序
func readyy(w string, sec int64){
secs := time.Duration(sec)*time.Second
time.Sleep(secs)
fmt.Println(w, "is ready!")
}