title: Is Sinatra multi threaded?
body: <p>Is Sinatra multi-threaded? I read else where that "sinatra is multi-threaded by default", what does that imply? </p>
  
  <p>Consider this example</p>
  
  <pre><code>get "/multithread" do
    t1 = Thread.new{
      puts "sleeping for 10 sec"
      sleep 10
      # Actually make a call to Third party API using HTTP NET or whatever.
    }
    t1.join
    "multi thread"
  end
  
  get "/dummy" do
    "dummy"
  end
  </code></pre>
  
  <p>If I access "/multithread" and "/dummy" subsequently in another tab or browser then nothing can be served(in this case for 10 seconds) till "/multithread" request is completed. In case activity freezes application becomes unresponsive.</p>
  
  <p>How can we work around this without spawning another  instance of the application?</p>