2013年3月6日

摘要: channel类似于UNIX里的管道,用于goruntines之间的通讯package mainimport ( "fmt" "runtime")type Person struct { name string}func (p Person) callSomebody(name string) { fmt.Println(p.name, name)}type Men interface { callSomebody(name string)}func say(s string, cn chan Men) { for i := 0; i < 5; i 阅读全文
posted @ 2013-03-06 00:26 Bridge M 阅读(195) 评论(0) 推荐(0) 编辑

导航