Skip to content

Instantly share code, notes, and snippets.

@FooBarWidget
Created September 20, 2012 10:53
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save FooBarWidget/3755207 to your computer and use it in GitHub Desktop.
Save FooBarWidget/3755207 to your computer and use it in GitHub Desktop.
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