Skip to content

Instantly share code, notes, and snippets.

@hotchpotch
Created October 3, 2011 10:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hotchpotch/1258851 to your computer and use it in GitHub Desktop.
Save hotchpotch/1258851 to your computer and use it in GitHub Desktop.
From 8f33021b62c3716d153d8f1dbb7b403a300e8164 Mon Sep 17 00:00:00 2001
From: Yuichi Tateno <hotchpotch@gmail.com>
Date: Mon, 3 Oct 2011 16:51:19 +0900
Subject: [PATCH] OobGC: force GC.start
---
lib/unicorn/oob_gc.rb | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/lib/unicorn/oob_gc.rb b/lib/unicorn/oob_gc.rb
index 312b44c..4e78a70 100644
--- a/lib/unicorn/oob_gc.rb
+++ b/lib/unicorn/oob_gc.rb
@@ -61,7 +61,9 @@ module Unicorn::OobGC
if OOBGC_PATH =~ OOBGC_ENV[PATH_INFO] && ((@@nr -= 1) <= 0)
@@nr = OOBGC_INTERVAL
OOBGC_ENV.clear
+ disabled = GC.enable
GC.start
+ GC.disable if disabled
end
end
--
1.7.5.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment