|
From: | Jason Wang |
Subject: | Re: [Qemu-devel] [PATCH 2/5] colo-compare: kick compare thread to exit while finalize |
Date: | Thu, 16 Feb 2017 10:34:55 +0800 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 |
On 2017年02月16日 10:25, Zhang Chen wrote:
@@ -703,13 +704,11 @@ static void colo_compare_finalize(Object *obj) qemu_chr_fe_deinit(&s->chr_sec_in); qemu_chr_fe_deinit(&s->chr_out); - g_queue_free(&s->conn_list); + g_main_loop_quit(s->compare_loop); + qemu_thread_join(&s->thread); - if (qemu_thread_is_self(&s->thread)) { - /* compare connection */ - g_queue_foreach(&s->conn_list, colo_compare_connection, s); - qemu_thread_join(&s->thread); - }Before free the 's->conn_list', you should flush all queued primary packets and release all queued secondary packets here, so combine this patch with 3/5 patch asone patch is a better choose. ThanksZhang Chen
Yes, agree. Thanks
[Prev in Thread] | Current Thread | [Next in Thread] |