From 4024887b58da42350bf75c3c47c408e1d2145070 Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Wed, 18 Apr 2012 11:22:27 +0100 Subject: [PATCH] Small tweak to better deal with value caching --- lib/redistat/mixins/synchronize.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/redistat/mixins/synchronize.rb b/lib/redistat/mixins/synchronize.rb index 170485e..b421b03 100644 --- a/lib/redistat/mixins/synchronize.rb +++ b/lib/redistat/mixins/synchronize.rb @@ -14,7 +14,8 @@ module Redistat def thread_safe monitor.synchronize do - @thread_safe ||= false + return @thread_safe unless @thread_safe.nil? + @thread_safe = false end end