Created
September 20, 2012 10:53
-
-
Save FooBarWidget/3755207 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app = proc do |env| | |
# This is a Ruby C extension method that we've written to simulate a freeze. | |
# It sleeps indefinitely, and unlike Kernel#sleep it does not unlock the Ruby | |
# 1.9 interpreter's GIL, so it really freezes everything. | |
PhusionPassenger::NativeSupport.freeze_process | |
[200, | |
{ "Content-Type" => "text/html" }, | |
["hello world\n"] | |
] | |
end | |
run app |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment