What are examples of unsafe code in Ruby?
I'm looking at using Sidekiq , an asynchronous job processing queue written in Ruby that runs its jobs using threads.
Because of the MRI and the GIL, developers tend to stay away from writing multithreaded code in Ruby, and therefore there isn't much writing about thread-safe code in Ruby.
Some common day-to-day patterns, such as result ||= something.call
no surrounding mutex, are not thread safe. So my question is some other simple plain Ruby code that is not thread-safe?
+3
source to share
No one has answered this question yet
Check out similar questions: