Slide 11
Slide 11 text
MODERNIZATION
module ThreadFetch
# Thread.fetch is only available since 2.5
refine Thread do
def fetch(key, fallback = : __undef __)
raise KeyError,
"key not found: #{key}" if
!key?(key) && fallback == : __undef __
self[key] || fallback
end
end
end
https://github.com/palkan/isolator