From 28dbbe752771c4a213f44140e3787c74770b87e6 Mon Sep 17 00:00:00 2001 From: evanweaver Date: Thu, 18 Oct 2007 21:03:53 +0000 Subject: move synchronousness back to HS git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@694 19e92222-5c0b-0410-8929-a290d50e31e9 --- lib/mongrel.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib/mongrel.rb') diff --git a/lib/mongrel.rb b/lib/mongrel.rb index 1d95714..a320411 100644 --- a/lib/mongrel.rb +++ b/lib/mongrel.rb @@ -809,8 +809,12 @@ module Mongrel # Stops the acceptor thread and then causes the worker threads to finish # off the request queue before finally exiting. - def stop + def stop(synchronous=false) @acceptor.raise(StopServer.new) + + if synchronous + sleep(0.5) while @acceptor.alive? + end end end -- cgit v1.2.3-24-ge0c7