{"author_url":"https://blog.hatena.ne.jp/letitride/","type":"rich","title":"A Tour of Go - Concurrency : \u81ea\u5206\u7528\u30ea\u30d5\u30a1\u30ec\u30f3\u30b9\u30e1\u30e2","height":"190","published":"2020-02-13 10:05:40","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwww.letitride.jp%2Fentry%2F2020%2F02%2F13%2F100540\" title=\"A Tour of Go - Concurrency : \u81ea\u5206\u7528\u30ea\u30d5\u30a1\u30ec\u30f3\u30b9\u30e1\u30e2 - \u8ffd\u61b6\u884c\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","description":"Goroutines Goroutines\u306f\u8efd\u91cf\u306a\u30b9\u30ec\u30c3\u30c9\u3002go\u3068\u8a18\u8ff0\u3059\u308b\u3060\u3051\u3067\u5225\u30b9\u30ec\u30c3\u30c9\u3067\u51e6\u7406\u304c\u5b9f\u88c5\u3055\u308c\u308b\u3002 go f(x, y, z) Channels channel\u3092\u4f7f\u7528\u3057\u3066goroutine\u9593\u3067\u30c7\u30fc\u30bf\u306e\u9001\u53d7\u4fe1\u3092\u884c\u3048\u308b\u3002 channel\u306e\u751f\u6210 ch := make(chan int) channel\u306e\u9001\u53d7\u4fe1 ch <- v // v \u3092\u30c1\u30e3\u30cd\u30eb ch \u3078\u9001\u4fe1\u3059\u308b v := <-ch // ch \u304b\u3089\u53d7\u4fe1\u3057\u305f\u5909\u6570\u3092 v \u3078\u5272\u308a\u5f53\u3066\u308b \u9001\u53d7\u4fe1\u306e\u4f8b\u3002x, y := <-c, <-c\u3067channel c\u30922\u56de\u53d7\u4fe1\u3059\u308b\u307e\u3067\u5f85\u3064\u3002 func sum(c chan int) { c <- 10 //\u2026","provider_url":"https://hatena.blog","image_url":null,"blog_url":"https://www.letitride.jp/","url":"https://www.letitride.jp/entry/2020/02/13/100540","provider_name":"Hatena Blog","categories":["\u30c6\u30c3\u30af","\u30c6\u30c3\u30af-Go"],"blog_title":"\u8ffd\u61b6\u884c","width":"100%","version":"1.0","author_name":"letitride"}