class Sinatra::Base

def synchronize(&block)

def synchronize(&block)
  if lock?
    @@mutex.synchronize(&block)
  else
    yield
  end
end