[gitg] Add silent async thread errors convenience



commit 746682d4228b2587132addf668e352081bea2193
Author: Jesse van den Kieboom <jessevdk gnome org>
Date:   Thu Aug 13 08:11:47 2015 +0200

    Add silent async thread errors convenience

 libgitg/gitg-async.vala |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/libgitg/gitg-async.vala b/libgitg/gitg-async.vala
index e18dd19..50f75d8 100644
--- a/libgitg/gitg-async.vala
+++ b/libgitg/gitg-async.vala
@@ -52,6 +52,14 @@ public class Async
                        throw err;
                }
        }
+
+       public static async void thread_try(ThreadFunc func)
+       {
+               try
+               {
+                       yield thread(func);
+               } catch {}
+       }
 }
 
 }


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