<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>hitode909</author_name>
  <author_url>https://blog.hatena.ne.jp/hitode909/</author_url>
  <blog_title>hitode909の日記</blog_title>
  <blog_url>https://blog.sushi.money/</blog_url>
  <categories>
  </categories>
  <description>Threadで並列に実行して一番早く得られた結果を採用するやつ．下のだと，二つのページを読み込んで，先に返ってきたページのタイトルを表示する．実行するたびに変わる． 並列に実行して最初に返ってきた結果を得るやつ — Gist これだと必ず1が出る． duel = Duel.new(lambda{ sleep 1 1 }, lambda { sleep 2 2 } ) duel.join puts duel.result こんなの本当は自分で書く必要ないと思う．どのgemでできるか教えてください． 追記 ThreadsWaitという標準添付ライブラリでできるそうです． Ruby で複数スレッドの…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog.sushi.money%2Fentry%2F2012%2F11%2F11%2F101703&quot; title=&quot;並列に実行して最初に返ってきた結果を得るやつ - hitode909の日記&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-11-11 10:17:03</published>
  <title>並列に実行して最初に返ってきた結果を得るやつ</title>
  <type>rich</type>
  <url>https://blog.sushi.money/entry/2012/11/11/101703</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
