Use a Mutex to make MemoryDatabase genuinely thread safe.
Use a Mutex to make MemoryDatabase genuinely thread safe.

While the "check and raise" boolean method sometimes works, it quickly
starts raising errors and spamming the console when run under a modern
threaded server like thin or puma. Since Ruby has a reliable, genuine
mutex, use it so that instead of tossing away any conflicting
transactions, they just line up and go one at a time.

mdsol/fake_sqs,jotengine/fake_sqs,iain/fake_sqs,revertio/fake_sqs,feathj/fake_sqs