Open
Description
Running a simple app on Puma under JRuby (in single mode with many threads), I've noticed that a single use
statement in my Sinatra class definition causes that piece of middleware to be instantiated multiple times, instead of it being instantiated once and shared between threads (as one might suspect). Moving the use
statement out of the class definition and into a rackup script solves the problem, as does calling run MyApp.new
instead of run MyApp
from the rackup script.
Sinatra 1.4.7, Puma 3.1.0, JRuby 9.0.5.0, OpenJDK 7.