ruby - Hash read/write thread-safe on key -


let's assume have hash like:

@@foo = { 1 => 2, 2 => 3, 3 => 4}

if want change value of key 1 have use mutex it's used whole read/write protection or mutex object defined key 1 write/reads ?

i not find detailed concept apart of using mutex necessary.


Comments