SyncEm: Thread-Safe Decorators in Ruby

I wrote some time ago about thread-safety in OOP and how it can be achieved with decorators. It was also said that it���s very important to make sure objects are thread-safe (in Ruby and in Java), especially in web apps, which are multi-threaded (well, in most cases anyway). Well, here is SyncEm, a primitive Ruby gem which makes the above possible with a single decorator.

Look at this simple Ruby web app, which increments the internal counter on every web click:

require 'sinatra' cla...
 •  0 comments  •  flag
Share on Twitter
Published on June 25, 2019 17:00
No comments have been added yet.