Skip to content

Commit

Permalink
Better way to pre-warm autoloads.
Browse files Browse the repository at this point in the history
  • Loading branch information
danp committed Jan 1, 2012
1 parent 0583a28 commit 44b2657
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/rackups/thread_safety.ru
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
require 'sinatra'

require 'rack/head' # workaround for rbx thread safety issue (most likely autoload related)

class App < Sinatra::Base
get('/id/:id/wait/:wait') do |id, wait|
sleep(wait.to_i)
id.to_s
end
end

# get everything autoloaded, mainly for rbx
App.new

run App

0 comments on commit 44b2657

Please sign in to comment.