qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] iothread: Set the GSource "name" field


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH] iothread: Set the GSource "name" field
Date: Tue, 5 Sep 2023 18:50:34 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.15.0

On 5/9/23 17:45, Peter Xu wrote:
On Mon, Sep 04, 2023 at 11:48:11AM -0300, Fabiano Rosas wrote:
@@ -189,11 +193,14 @@ static void iothread_init(EventLoopBase *base, Error 
**errp)
          return;
      }
+ thread_name = g_strdup_printf("IO %s",
+                        object_get_canonical_path_component(OBJECT(base)));
+
      /*
       * Init one GMainContext for the iothread unconditionally, even if
       * it's not used
       */
-    iothread_init_gcontext(iothread);
+    iothread_init_gcontext(iothread, thread_name);
iothread_set_aio_context_params(base, &local_error);
      if (local_error) {

I think thread_name might be leaked if error here.  Thanks,

Oops, good catch. Better switch to g_autofree.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]