~/talk

Concurrency in Ruby: Threads, Fibers and Ractors Demystified

Talkat RubyConf India 2023 · 2023-08-26..08-27· [ruby, concurrency]
name:Magesh
links:none on file
slides:none on file

Ruby 3 adds real options: threads give concurrency but not parallelism because the GIL serializes Ruby bytecode; fibers are developer-controlled, lightweight (creating 100 fibers vs 100 threads is much cheaper) and work well with the Async gem and Async::IO for nonblocking I/O but require explicit yield/resume and risk starvation; Ractors run in isolated memory, communicate with send/receive or yield/take, enable true parallel CPU work (example: chunk 10,000 items across 4 ractors) and show ~3x speed in CPU-bound benchmarks, but ractor-compatible gems and limited shareable objects remain constraints.

AI-written summary · about

  1. 0:00Introduction
  2. 2:01Concurrency vs Parallelism
  3. 4:28Working with threads
  4. 8:14Fibers and Async
  5. 14:03Introduction to Ractors
  6. 19:32Ractor examples and limitations
  7. 24:53Q&A session
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.