diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/mauve/configuration.rb | 2 | ||||
-rw-r--r-- | lib/mauve/mauve_thread.rb | 8 |
2 files changed, 7 insertions, 3 deletions
diff --git a/lib/mauve/configuration.rb b/lib/mauve/configuration.rb index baf6ad1..0d3e520 100644 --- a/lib/mauve/configuration.rb +++ b/lib/mauve/configuration.rb @@ -88,6 +88,8 @@ module Mauve require "log4r/outputter/#{@outputter.downcase}" end + @outputter_name = "Mauve-"+5.times.collect{rand(36).to_s(36)}.join + @args = {} end diff --git a/lib/mauve/mauve_thread.rb b/lib/mauve/mauve_thread.rb index 1aa8619..4a2787d 100644 --- a/lib/mauve/mauve_thread.rb +++ b/lib/mauve/mauve_thread.rb @@ -53,13 +53,15 @@ module Mauve @frozen = true - 20.times { Kernel.sleep 0.1 ; break if @thread.stop? } + if @thread.is_a?(Thread) + 20.times { Kernel.sleep 0.1 ; break if @thread.stop? } - logger.debug("Thread has not frozen!") unless @thread.stop? + logger.debug("Thread has not frozen!") unless @thread.stop? + end end def frozen? - defined? @frozen and @frozen and @thread.stop? + defined? @frozen and @frozen and @thread.is_a?(Thread) and @thread.stop? end def thaw |