Skip to content

Instantly share code, notes, and snippets.

View alanhala's full-sized avatar

Alan Halatian alanhala

View GitHub Profile
@alanhala
alanhala / example.rb
Created April 11, 2018 19:18
MRI-GIL Context switch examples from this talk: https://www.youtube.com/watch?v=1nNfTWHF2YY
@bank_account = 0
# WORKS
# 100.times.map do
# Thread.new do
# 10_000.times do
# value = @bank_account
# value = value + 1
# @bank_account = value