<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>podhmo</author_name>
  <author_url>https://blog.hatena.ne.jp/podhmo/</author_url>
  <blog_title>podhmo's diary</blog_title>
  <blog_url>https://pod.hatenablog.com/</blog_url>
  <categories>
    <anon>golang</anon>
    <anon>memo</anon>
  </categories>
  <description>N個のchannelがcloseされるまで読み込む方法についてのメモ。 1個のchannelがcloseされるまで読み込む まずはじめにN=1の場合について。これは単にforループで取り出せば良い。 package main import ( &quot;fmt&quot; &quot;sync&quot; &quot;time&quot; ) func main() { var wg sync.WaitGroup ch := make(chan int) wg.Add(1) go func() { defer close(ch) defer wg.Done() for _, x := range []int{1, 2, 3, 4, 5} { ch &lt;…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fpod.hatenablog.com%2Fentry%2F2019%2F03%2F19%2F002236&quot; title=&quot;N個のchannelがcloseされるまで読み込む方法について - podhmo&amp;#39;s diary&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2019-03-19 00:22:36</published>
  <title>N個のchannelがcloseされるまで読み込む方法について</title>
  <type>rich</type>
  <url>https://pod.hatenablog.com/entry/2019/03/19/002236</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
