[banshee] [Banshee.Daap] Avoid blocking the main loop



commit 01b49d69d704e4650f55353ac13805686d474f26
Author: Gabriel Burt <gabriel burt gmail com>
Date:   Thu Dec 10 16:37:28 2009 -0800

    [Banshee.Daap] Avoid blocking the main loop

 .../Banshee.Daap/Banshee.Daap/DaapService.cs       |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/src/Extensions/Banshee.Daap/Banshee.Daap/DaapService.cs b/src/Extensions/Banshee.Daap/Banshee.Daap/DaapService.cs
index 058daa9..e533358 100644
--- a/src/Extensions/Banshee.Daap/Banshee.Daap/DaapService.cs
+++ b/src/Extensions/Banshee.Daap/Banshee.Daap/DaapService.cs
@@ -133,10 +133,10 @@ namespace Banshee.Daap
 
         public void DelayedInitialize ()
         {
-            Application.RunTimeout (3*1000, DelayedInitializeTimeout);
+            ThreadAssist.SpawnFromMain (ThreadedInitialize);
         }
 
-        public bool DelayedInitializeTimeout ()
+        public void ThreadedInitialize ()
         {
             // Add the source, even though its empty, so that the user sees the
             // plugin is enabled, just no child sources yet.
@@ -160,7 +160,6 @@ namespace Banshee.Daap
             } catch (Exception e) {
                 Hyena.Log.Exception ("Failed to start DAAP client", e);
             }
-            return false;
         }
 
         string IService.ServiceName {



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