[gnome-dvb-daemon] Removed usage of deprecated Thread.create function



commit c11c25b7c780e9a9d542fe218fb5c8bb031a1dd8
Author: Sebastian PÃlsterl <sebp k-d-w org>
Date:   Wed Mar 7 23:15:41 2012 +0100

    Removed usage of deprecated Thread.create function

 src/EPGScanner.vala |    6 +++---
 src/Scanner.vala    |    6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/src/EPGScanner.vala b/src/EPGScanner.vala
index f45bd28..b17ad16 100644
--- a/src/EPGScanner.vala
+++ b/src/EPGScanner.vala
@@ -45,7 +45,7 @@ namespace DVB {
         private int stop_counter;
         private MainContext context;
         private MainLoop loop;
-        private unowned Thread<void*> worker_thread;
+        private Thread<void*> worker_thread;
         private uint bus_watch_id;
         private HashMap<uint, HashSet<Event>> channel_events;
         
@@ -138,8 +138,8 @@ namespace DVB {
 
             this.loop = new MainLoop (this.context, false);
             try {
-                this.worker_thread = Thread.create<void*> (this.worker, true);
-            } catch (ThreadError e) {
+                this.worker_thread = new Thread<void*>.try ("EPG-Worker-Thread", this.worker);
+            } catch (Error e) {
                 log.error ("Could not create thread: %s", e.message);
                 return false;
             }
diff --git a/src/Scanner.vala b/src/Scanner.vala
index 65afa1f..f2d2437 100644
--- a/src/Scanner.vala
+++ b/src/Scanner.vala
@@ -110,7 +110,7 @@ namespace DVB {
         private bool locked;
         private MainContext context;
         private MainLoop loop;
-        private unowned Thread<void*> worker_thread;
+        private Thread<void*> worker_thread;
         private bool running;
         private uint bus_watch_id;
         
@@ -158,8 +158,8 @@ namespace DVB {
         
             this.loop = new MainLoop (this.context, false);
             try {
-                this.worker_thread = Thread.create<void*> (this.worker, true);
-            } catch (ThreadError e) {
+                this.worker_thread = new Thread<void*>.try ("Scanner-Worker-Thread", this.worker);
+            } catch (Error e) {
                 log.error ("Could not create thread: %s", e.message);
                 return;
             }



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