HTTP server in Ruby 3 - Fibers
29-Jul-2021 2261
Historically Ruby's been lacking in the concurrency department. Ruby has "native" threads (prior to 1.9 there were only "green"), which means there can be multiple threads controlled by an OS, but only 1 thread can be executed at a time, this is managed via Global Interpreter Lock (GIL). However, native calls and I/O calls can be executed in parallel. During an I/O call, a thread gives up control and waits for a signal that the I/O has finished. This means I/O heavy applications can benefit from multiple threads.
HTTP server in Ruby 3 - Fibers #ruby #rubydeveloper #rubyonrails #server #Fibers #server https://rubyonrails.ba/link/http-server-in-ruby-3-fibers