[gnome-boxes] Mark callback function as owned in run_in_thread



commit d3c7a347ff419a787fc84d2b1529d620c5f0b335
Author: Alexander Larsson <alexl redhat com>
Date:   Mon Aug 27 15:04:30 2012 +0200

    Mark callback function as owned in run_in_thread
    
    Without this vala will not automatically ref/unref any data
    (such as locals blocks) during the runtime of the operation.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=682792

 src/util.vala |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/util.vala b/src/util.vala
index 19f5dd6..2521437 100644
--- a/src/util.vala
+++ b/src/util.vala
@@ -168,7 +168,7 @@ namespace Boxes {
     }
 
     public delegate void RunInThreadFunc () throws  GLib.Error;
-    public async void run_in_thread (RunInThreadFunc func, Cancellable? cancellable = null) throws GLib.Error {
+    public async void run_in_thread (owned RunInThreadFunc func, Cancellable? cancellable = null) throws GLib.Error {
         GLib.Error e = null;
         GLib.IOSchedulerJob.push ((job, cancellable) => {
             try {



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