<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>riocampos</author_name>
  <author_url>https://blog.hatena.ne.jp/riocampos/</author_url>
  <blog_title>別館 子子子子子子（ねこのここねこ）はてブロ部</blog_title>
  <blog_url>https://riocampos-tech.hatenablog.com/</blog_url>
  <categories>
    <anon>Ruby</anon>
    <anon>tips</anon>
  </categories>
  <description>いままでよく使ってたイディオム Threadを集めるArrayを用意する。 th = [] n.times do |i| th[i] = Thread.start{ do_something } end th.each(&amp;:join) '14/6/30追記：Arrayにpushする th = [] n.times do th &lt;&lt; Thread.new { do_something } end th.each(&amp;:join) 最初の例と同じなのだけど、変数iを使わなくて済むので楽ですね。 ちょっと楽なイディオム 次の本のp.396に記載があったイディオム。Ruby Way 第2版 (Profe…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Friocampos-tech.hatenablog.com%2Fentry%2F20140412%2Fthread_join_idiom&quot; title=&quot;Thread.joinのイディオム - 別館 子子子子子子（ねこのここねこ）はてブロ部&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/51okU1xsXlL._SL160_.jpg</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2014-04-12 00:00:00</published>
  <title>Thread.joinのイディオム</title>
  <type>rich</type>
  <url>https://riocampos-tech.hatenablog.com/entry/20140412/thread_join_idiom</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
