<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>ledsun</author_name>
  <author_url>https://blog.hatena.ne.jp/ledsun/</author_url>
  <blog_title>@ledsun blog</blog_title>
  <blog_url>https://ledsun.hatenablog.com/</blog_url>
  <categories>
    <anon>技</anon>
    <anon>Ruby</anon>
    <anon>Ractor</anon>
    <anon>並列</anon>
  </categories>
  <description>注意：Ractorならではとか、計算効率の良さとか考えていません。 1から10までを足す # 最終結果送り先のRactor CR = Ractor.current r = Ractor.new { CR &lt;&lt; Ractor.recv } 1.upto(10) do |i| # 数を足すRactorを作ってポインタを置き換える r = Ractor.new(r, i) do |next_r, i| # 担当の整数を足して次のRactorに送る next_r &lt;&lt; Ractor.recv + i end end r &lt;&lt; 0 # 計算開始。初期値を送る p Ractor.recv # 結果を出力 …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fledsun.hatenablog.com%2Fentry%2F2020%2F04%2F18%2F223425&quot; title=&quot;Ractorを使ってプログラムを書く練習　　　　 - @ledsun blog&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-04-18 22:34:25</published>
  <title>Ractorを使ってプログラムを書く練習　　　　</title>
  <type>rich</type>
  <url>https://ledsun.hatenablog.com/entry/2020/04/18/223425</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
