From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:46210) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RUxHo-0004QE-DX for qemu-devel@nongnu.org; Mon, 28 Nov 2011 04:14:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RUxHf-0005xA-GX for qemu-devel@nongnu.org; Mon, 28 Nov 2011 04:14:04 -0500 Received: from mel.act-europe.fr ([194.98.77.210]:47614) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RUxHf-0005uM-CB for qemu-devel@nongnu.org; Mon, 28 Nov 2011 04:13:55 -0500 Message-ID: <4ED350B6.3050106@adacore.com> Date: Mon, 28 Nov 2011 10:13:26 +0100 From: Fabien Chouteau MIME-Version: 1.0 References: <71e840e5-083a-48f1-b7e7-c9c0feaef35c@zmail13.collab.prod.int.phx2.redhat.com> <4ECFC8BF.6060303@adacore.com> <4ECFEE3F.2000701@redhat.com> In-Reply-To: <4ECFEE3F.2000701@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2/2] main: switch qemu_set_fd_handler to g_io_add_watch List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Blue Swirl , Anthony Liguori , qemu-devel@nongnu.org On 25/11/2011 20:36, Paolo Bonzini wrote: > On 11/25/2011 05:56 PM, Fabien Chouteau wrote: >>>> >> Is it possible to use both? Keep the select scheme for iohandlers and >>>> >> slirp, but use g_main_context_iteration() for Glib stuff. >>> > >>> > Perhaps with two threads, but I think it's more complicated than >>> > merging the handle/fd sets and doing a single poll. >> Why two threads? > > Because you have two disjoint sets of file descriptors (iohandler+slirp and glib), both of which have to be waited on for a possibly infinite file. You cannot do that at the same time without two threads (unless you alternatively poll one and the other). > Right, thank you for all these explanations. Regards, -- Fabien Chouteau