<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>gsf_zero1</author_name>
  <author_url>https://blog.hatena.ne.jp/gsf_zero1/</author_url>
  <blog_title>いろいろ備忘録日記</blog_title>
  <blog_url>https://devlights.hatenablog.com/</blog_url>
  <categories>
    <anon>golang</anon>
  </categories>
  <description>概要 仕様みたいなもの サンプル 概要 Goでは、ゴルーチンとチャネルがあるので、非同期処理が楽にかけます。 個人的に、よく利用するのが Producer/Consumer な処理が多いので、それのサンプル作ってみました。 チャネル自体が、ブロッキング付きのキューみたいなものなのでやりやすいですね。 C#でいうと、BlockingCollectionみたいな感じ。 非同期処理を作る場合に大事なのは各処理の役割をきっちり決めておくことと、一つの役割にいっぱい仕事を持たせないこと。 今回のサンプルでは以下の役割を用意しました。 管理者 それぞれのタスクの管理をする役割。全体的な開始と終了を管理する…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fdevlights.hatenablog.com%2Fentry%2F2020%2F02%2F10%2F035535&quot; title=&quot;Goメモ-49 (ゴルーチンとチャネルでProducer/Consumer処理を作る) - いろいろ備忘録日記&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>2020-02-10 03:55:35</published>
  <title>Goメモ-49 (ゴルーチンとチャネルでProducer/Consumer処理を作る)</title>
  <type>rich</type>
  <url>https://devlights.hatenablog.com/entry/2020/02/10/035535</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
