|
From: | Paolo Bonzini |
Subject: | Re: [Qemu-devel] [PATCH 2/2] main: switch qemu_set_fd_handler to g_io_add_watch |
Date: | Fri, 25 Nov 2011 20:36:31 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20110930 Thunderbird/7.0.1 |
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).
Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |