[gnome-boxes] util: Add optional cancellable arg to run_in_thread



commit ef7e5cec70a7851c2f90af0b1bc7263076dc98f7
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Sat Jul 14 00:30:51 2012 +0300

    util: Add optional cancellable arg to run_in_thread
    
    https://bugzilla.gnome.org/show_bug.cgi?id=679896

 src/util.vala |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/util.vala b/src/util.vala
index a5d7d72..8587d30 100644
--- a/src/util.vala
+++ b/src/util.vala
@@ -437,7 +437,7 @@ namespace Boxes {
     }
 
     public delegate void RunInThreadFunc () throws  GLib.Error;
-    public async void run_in_thread (RunInThreadFunc func) throws GLib.Error {
+    public async void run_in_thread (RunInThreadFunc func, Cancellable? cancellable = null) throws GLib.Error {
         GLib.Error e = null;
         GLib.g_io_scheduler_push_job ((job, cancellable) => {
             try {
@@ -453,7 +453,7 @@ namespace Boxes {
             });
 
             return false;
-        });
+        }, GLib.Priority.DEFAULT, cancellable);
 
         yield;
 



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