diff options
author | Zeeshan Ali (Khattak) <zeeshanak@gnome.org> | 2012-07-14 00:30:51 +0300 |
---|---|---|
committer | Zeeshan Ali (Khattak) <zeeshanak@gnome.org> | 2012-07-15 00:48:49 +0300 |
commit | ef7e5cec70a7851c2f90af0b1bc7263076dc98f7 (patch) | |
tree | 3eeacbf54158775b5932a31340955e6f90891345 | |
parent | 0ef5e4a43cbe5518ad38bd0e9c1d2636898a40cf (diff) |
util: Add optional cancellable arg to run_in_thread
https://bugzilla.gnome.org/show_bug.cgi?id=679896
-rw-r--r-- | 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; |