I'm developing a Sinatra app which uses unicorn. Each worker is one thread, it loads the whole application, they just share the db. (please correct my if I'm wrong ;) )
The first thread gets the Integer, does something with it and then increments it, the second thread should not get the Integer of the first thread (thread safety), it should only get the incremented Integer.
I did that with blocking, but want to find a better approach because during my research I often read that this is a very bad way of solving my problem as it's not very scaleable.
If you want to see my whole application feel free to check it out on github ;)