Creating a UDP server with Ruby Ractors
17-Mar-2021 229
Ruby (MRI) has a Global VM lock. This means that you cannot execute code in multiple threads at the same time. You can achieve a lot of great things with Threads, especially if you have a lot of I/O, but parallel execution in Threads does not exist in Ruby.Ruby 3.0 introduces Ractors, a concept that lets you create true parallel execution with messages flowing between Ractors instead of shared objects. You can think of a Ractor as an independent worker that you can call up and ask to do a task for you while you do something else.This feature is experimental in Ruby 3.0 and might have changes in the future. All examples here are with Ruby 3.0.
Creating a UDP server with Ruby Ractors #ruby #rubydeveloper #rubyonrails #Creating #server #Ractors #server https://rubyonrails.ba/link/creating-a-udp-server-with-ruby-ractors