On Fri, Dec 18, 2015 at 09:11:04AM -0500, Frediano Ziglio wrote: > > > > On Fri, Dec 18, 2015 at 06:41:57AM -0500, Frediano Ziglio wrote: > > > The patch is this anyway > > > http://cgit.freedesktop.org/~fziglio/spice-server/commit/?id=452edd8f7aa25fc1e69b6c2a747f59f58ab07f32 > > > > > > So could be your patch can work. However the main idea of my > > > patch was not to fix this "strange" code but to have a single > > > source for the event loop with better (and automated) way of > > > testing it. > > > > Which "strange" code are you referring to ? The one from this cgit > > link, or the one modified by my patch? I don't think assuming that > > 'opaque' will always be a RedWorker instance is a good assumption to > > make, so this is a NACK from me for this patch as it is now. > > > > NACK what? The code is in master! NACK to the patch I'm replying to ("tests: create and use a template file for events"), and to the next one which depends on this one, which are not in master as far as I can tell. I don't think there is code in master assuming that the 'opaque' data passed to timer callbacks is actually a RedWorker instance. > > > And still I would prefer a simple __thread variable. > > > > I prefer the more explicit get_main_context() calls as it's obvious > > something is going on. With __thread, you had to dig up to the > > declaration of the variable to realize there is some magic involved. > > > > Christophe > > > > You can use an inline function if you prefer. > > Sometimes looks like Glib is the bible... Not the bible, just that it has a convenience function doing exactly what we need so... As things stand, a simple helper + __thread will indeed do the trick, if we were to start using gio for asynchronous IO, g_main_context_push_thread_default() would become much more useful. Christophe
Attachment:
signature.asc
Description: PGP signature
_______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/spice-devel