はじめまして、グロービスのサーバーサイドエンジニアをしている大澤(@qwyngg)と申します。 Ruby3、そしてRactorがでましたね! さっそくrbenv global 3.0.0して試していこうと思います。 Ractorとは?並行性のあるコードを書くための新機能です。RubyKaigiでGuildという名前を聞いたことがある方もいらっしゃると思いますが、そのGuildが名称を変えてリリースされました。 名前の通りActorモデルを参考にした機能だそうです。 Ractor.newにブロックを渡すことで並列処理を実行させることができます。 Ractor.new { 5.times do puts :hoge end } Ractor.new { 5.times do puts :fuga end } puts :sleep sleep(5) # Ractorの処理を待ちたいので適当にs