Skip to content
Browse files

Better way to pre-warm autoloads.

  • Loading branch information...
1 parent 0583a28 commit 44b265783763145b41cdc28308765a9dd76ca023 @dpiddy dpiddy committed Dec 30, 2011
Showing with 3 additions and 2 deletions.
  1. +3 −2 tests/rackups/thread_safety.ru
View
5 tests/rackups/thread_safety.ru
@@ -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.
Something went wrong with that request. Please try again.