[hyena] [Hyena] Allow setting ApplicationContext.Debugging



commit d88b0251880b960b701326cae4c6c82253cdd00c
Author: Gabriel Burt <gabriel burt gmail com>
Date:   Thu Nov 4 17:54:54 2010 -0500

    [Hyena] Allow setting ApplicationContext.Debugging
    
    Also don't crash if main thread already has a name.

 Hyena/Hyena/ApplicationContext.cs |    4 ++++
 Hyena/Hyena/ThreadAssist.cs       |    6 +++++-
 2 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/Hyena/Hyena/ApplicationContext.cs b/Hyena/Hyena/ApplicationContext.cs
index 77dfc17..fd4fcfa 100644
--- a/Hyena/Hyena/ApplicationContext.cs
+++ b/Hyena/Hyena/ApplicationContext.cs
@@ -70,6 +70,10 @@ namespace Hyena
 
                 return debugging.Value;
             }
+            set {
+                debugging = value;
+                Log.Debugging = Debugging;
+            }
         }
 
         public static bool EnvironmentIsSet (string env)
diff --git a/Hyena/Hyena/ThreadAssist.cs b/Hyena/Hyena/ThreadAssist.cs
index c685046..f6fd93b 100644
--- a/Hyena/Hyena/ThreadAssist.cs
+++ b/Hyena/Hyena/ThreadAssist.cs
@@ -45,7 +45,11 @@ namespace Hyena
         public static void InitializeMainThread ()
         {
             main_thread = Thread.CurrentThread;
-            main_thread.Name = "Main Thread";
+            try {
+                main_thread.Name = "Main Thread";
+            } catch {
+                Log.DebugFormat ("Main thread set to {0}", main_thread.Name);
+            }
         }
 
         public static bool InMainThread {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]