<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>m_seki</author_name>
  <author_url>https://blog.hatena.ne.jp/m_seki/</author_url>
  <blog_title>@m_seki の</blog_title>
  <blog_url>https://druby.hatenablog.com/</blog_url>
  <categories>
  </categories>
  <description>Rubyのスレッドは素晴らしいと思うのですが、なぜか人気がありません。Fiberで書けば人気が出ると思うので、ときどき調べています。多くのサンプルは次のようなジェネレーターっぽいものです。 fib = Fiber.new do a, b = 1, 1 while true Fiber.yield(a) a, b = b, a + b end end 10.times do |n| p [n, fib.resume] end Enumeratorなどの実装もこんな感じでできてるんでしょうね。 二つの実行主体（fibのFiberと10.times..してるメイン部分）はメイン部分がFiberを利用…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fdruby.hatenablog.com%2Fentry%2F2017%2F05%2F14%2F092137&quot; title=&quot;Fiberのための同期機構の作り方 - @m_seki の&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>https://images-fe.ssl-images-amazon.com/images/I/51K0jUf%2BiEL._SL75_.jpg</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2017-05-14 09:21:37</published>
  <title>Fiberのための同期機構の作り方</title>
  <type>rich</type>
  <url>https://druby.hatenablog.com/entry/2017/05/14/092137</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
