[~/sinatra/sinatra-simple(master)]$ pwd -P /Users/casiano/local/src/ruby/sinatra/sinatra-simple
[~/sinatra/sinatra-simple(master)]$ git remote -v origin git@github.com:crguezl/sinatra-simple.git (fetch) origin git@github.com:crguezl/sinatra-simple.git (push)
[~/sinatra/sinatra-simple(master)]$ cat hi.rb require 'sinatra' get '/hi' do "Hello World!" end
[~/sinatra/sinatra-simple(master)]$ ruby hi.rb --help
Usage: hi [options]
-p port set the port (default is 4567)
-o addr set the host (default is localhost)
-e env set the environment (default is development)
-s server specify rack server/handler (default is thin)
-x turn on the mutex lock (default is off)
Sinatra can be used in threaded environments where more than a
single request is processed at a time.
However, not all applications and libraries are thread-safe and may cause intermittent errors or general weirdness.
Enabling the -x setting causes all requests
to synchronize on a mutex lock, ensuring that only a single request
is processed at a time.
The mutex lock setting is disabled by default.