{"provider_name":"Hatena Blog","categories":["\u6280","Ruby","Ractor","\u4e26\u5217"],"author_url":"https://blog.hatena.ne.jp/ledsun/","version":"1.0","url":"https://ledsun.hatenablog.com/entry/2020/04/18/223425","published":"2020-04-18 22:34:25","provider_url":"https://hatena.blog","description":"\u6ce8\u610f\uff1aRactor\u306a\u3089\u3067\u306f\u3068\u304b\u3001\u8a08\u7b97\u52b9\u7387\u306e\u826f\u3055\u3068\u304b\u8003\u3048\u3066\u3044\u307e\u305b\u3093\u3002 1\u304b\u308910\u307e\u3067\u3092\u8db3\u3059 # \u6700\u7d42\u7d50\u679c\u9001\u308a\u5148\u306eRactor CR = Ractor.current r = Ractor.new { CR << Ractor.recv } 1.upto(10) do |i| # \u6570\u3092\u8db3\u3059Ractor\u3092\u4f5c\u3063\u3066\u30dd\u30a4\u30f3\u30bf\u3092\u7f6e\u304d\u63db\u3048\u308b r = Ractor.new(r, i) do |next_r, i| # \u62c5\u5f53\u306e\u6574\u6570\u3092\u8db3\u3057\u3066\u6b21\u306eRactor\u306b\u9001\u308b next_r << Ractor.recv + i end end r << 0 # \u8a08\u7b97\u958b\u59cb\u3002\u521d\u671f\u5024\u3092\u9001\u308b p Ractor.recv # \u7d50\u679c\u3092\u51fa\u529b \u2026","title":"Ractor\u3092\u4f7f\u3063\u3066\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u66f8\u304f\u7df4\u7fd2\u3000\u3000\u3000\u3000","width":"100%","type":"rich","blog_title":"@ledsun blog","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fledsun.hatenablog.com%2Fentry%2F2020%2F04%2F18%2F223425\" title=\"Ractor\u3092\u4f7f\u3063\u3066\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u66f8\u304f\u7df4\u7fd2\u3000\u3000\u3000\u3000 - @ledsun blog\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","image_url":null,"author_name":"ledsun","height":"190","blog_url":"https://ledsun.hatenablog.com/"}