From 746682d4228b2587132addf668e352081bea2193 Mon Sep 17 00:00:00 2001 From: Jesse van den Kieboom Date: Thu, 13 Aug 2015 08:11:47 +0200 Subject: [PATCH] Add silent async thread errors convenience --- libgitg/gitg-async.vala | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libgitg/gitg-async.vala b/libgitg/gitg-async.vala index e18dd19e..50f75d84 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 {} + } } }