<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>takuya_1st</author_name>
  <author_url>https://blog.hatena.ne.jp/takuya_1st/</author_url>
  <blog_title>それマグで！</blog_title>
  <blog_url>https://takuya-1st.hatenablog.jp/</blog_url>
  <categories>
    <anon>ruby</anon>
  </categories>
  <description>IO.pipeを使えば、パイプを作ることが出来る パイプを作ると楽しい。 o,i = IO.pipe 100.times{ i.puts :test } 100.times{ puts o.gets }これだけ Pipeを使うと何が便利か。スレッドをブロック出来る loop{ p o. gets }で i.puts を待つことが出来る。どういうことかというと IO.pipeはブロックする？ &gt;&gt; input.puts &quot;aaaaaaaaa&quot; #=&gt; nil &gt;&gt; input.puts &quot;aaaaaaaaa&quot; #=&gt; nil &gt;&gt; input.puts &quot;aaaaaaaaa&quot; #=&gt; nil &gt;…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftakuya-1st.hatenablog.jp%2Fentry%2F20120205%2F1328470521&quot; title=&quot;RubyはIO.pipeを使えば、パイプを作ることが出来る   - それマグで！&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>2012-02-05 04:35:21</published>
  <title>RubyはIO.pipeを使えば、パイプを作ることが出来る  </title>
  <type>rich</type>
  <url>https://takuya-1st.hatenablog.jp/entry/20120205/1328470521</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
