~/talk

What does GIL really guarantee you?

Talkat RubyConf 2017 · 2017-11-15..11-17· [ruby]
slides:none on file

Ruby MRI’s GIL protects only internal C-level data structures (arrays, hashes) not surrounding Ruby code, so GIL protects C internals not Ruby-level operations. A harmless refactor that inserts a method call can introduce a race because MRI does context switches on method call/return, so context switch can happen at any Ruby line. Running with JRuby (no GIL) or turning off extra cores doesn’t fix races; a real production bug exposed other users’ orders via Sidekiq + Shopify API gem + rails active resource.

AI-written summary · about

  1. 0:00Introduction
  2. 1:00What does GIL do
  3. 1:30My project
  4. 2:22Race condition
  5. 9:20Parallelism
  6. 19:43Context Switching
  7. 22:18Conclusion
~/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.