Search posts, tags, users, and pages
先來一段程式 func main() { done := make(chan bool) values := []string{"a", "b", "c"} for _, v := range values { /* 在每次loop中,此程式碼會啟動一個Goroutine來執行匿名函數。 該函數將當前的值v輸出出來,然後將true發送到done通道。 */ go func() { ...
雷N
@nathanrayn · Taipei, Taiwan
Markdown supported · ⌘↵ to post
No responses yet.