Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
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