On 25/11/2011 16:48, Paolo Bonzini wrote: >>> There's a fundamental impedence mismatch between glib and >>> slirp/iohandler. Either you convert glib's pollfds to fd_sets, or >>> you >>> take slirp and iohandler's fd_sets and put them in pollfds. >>> Converting slirp and iohandler to produce pollfds is not easy >>> because >>> Windows does not have poll---so you'd still have a pollfd-to-fd_set >>> conversion somewhere. >> >> 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? -- Fabien Chouteau