Re: [Spice-devel] [RFC] server: add main_dispatcher

2011-10-18 Thread Alon Levy
On Tue, Oct 18, 2011 at 01:34:09PM +0200, Yonit Halperin wrote: > On 09/08/2011 02:17 AM, Alon Levy wrote: > Hi, > I think this patch is sufficient for the 0.8 branch (+ the comments > bellow + locks (for several display channels threads)). > However for master, due to the red_channel refactoring I

Re: [Spice-devel] [RFC] server: add main_dispatcher

2011-10-18 Thread Yonit Halperin
On 09/08/2011 02:17 AM, Alon Levy wrote: Hi, I think this patch is sufficient for the 0.8 branch (+ the comments bellow + locks (for several display channels threads)). However for master, due to the red_channel refactoring I think we should have a more general dispatcher. It would be nice if (1

Re: [Spice-devel] [RFC] server: add main_dispatcher

2011-09-19 Thread Lennart Poettering
On Thu, 08.09.11 02:24, Marc-André Lureau (marcandre.lur...@gmail.com) wrote: > Lennart, I wonder what today you think about it, if there is any > drawback or improvements. ie would you use it again? I'd always go for socketpair() unless you have a really really good reason to go for atomic op st

Re: [Spice-devel] [RFC] server: add main_dispatcher

2011-09-08 Thread Marc-André Lureau
Hi On Thu, Sep 8, 2011 at 11:38 AM, Alon Levy wrote: > On Thu, Sep 08, 2011 at 11:26:00AM +0200, Hans de Goede wrote: >> Hi, > > ok. I guess I'll add an assert (not ASSERT). I'm still looking at the > pulseaudio IPC - it looks > like asyncmsgq is good for what we need - it's meant for multiple w

Re: [Spice-devel] [RFC] server: add main_dispatcher

2011-09-08 Thread Alon Levy
On Thu, Sep 08, 2011 at 02:24:32AM +0200, Marc-André Lureau wrote: > Hi Alon, > > On Thu, Sep 8, 2011 at 1:17 AM, Alon Levy wrote: > > --- > >  server/Makefile.am       |    2 + > >  server/main_dispatcher.c |  132 > > ++ > >  server/main_dispatcher.h

Re: [Spice-devel] [RFC] server: add main_dispatcher

2011-09-08 Thread Alon Levy
On Thu, Sep 08, 2011 at 11:26:00AM +0200, Hans de Goede wrote: > Hi, > > On 09/08/2011 11:18 AM, Alon Levy wrote: > >On Thu, Sep 08, 2011 at 10:58:41AM +0200, Hans de Goede wrote: > >>Hi, > >> > >>On 09/08/2011 09:31 AM, Gerd Hoffmann wrote: > >>>Hi, > >>> > >simple object system, not unions).

Re: [Spice-devel] [RFC] server: add main_dispatcher

2011-09-08 Thread Hans de Goede
Hi, On 09/08/2011 11:18 AM, Alon Levy wrote: On Thu, Sep 08, 2011 at 10:58:41AM +0200, Hans de Goede wrote: Hi, On 09/08/2011 09:31 AM, Gerd Hoffmann wrote: Hi, simple object system, not unions). Just an idea, could be changed later perhaps. socketpair is probably fine. First of all I see

Re: [Spice-devel] [RFC] server: add main_dispatcher

2011-09-08 Thread Alon Levy
On Thu, Sep 08, 2011 at 10:58:41AM +0200, Hans de Goede wrote: > Hi, > > On 09/08/2011 09:31 AM, Gerd Hoffmann wrote: > >Hi, > > > >>>simple object system, not unions). Just an idea, could be changed > >>>later perhaps. socketpair is probably fine. > >> > >>First of all I see I forgot to add a mut

Re: [Spice-devel] [RFC] server: add main_dispatcher

2011-09-08 Thread Alon Levy
On Thu, Sep 08, 2011 at 09:31:33AM +0200, Gerd Hoffmann wrote: > Hi, > > >>simple object system, not unions). Just an idea, could be changed > >>later perhaps. socketpair is probably fine. > > > >First of all I see I forgot to add a mutex, since I said "any non main > >thread", right > >now we

Re: [Spice-devel] [RFC] server: add main_dispatcher

2011-09-08 Thread Hans de Goede
Hi, On 09/08/2011 09:31 AM, Gerd Hoffmann wrote: Hi, simple object system, not unions). Just an idea, could be changed later perhaps. socketpair is probably fine. First of all I see I forgot to add a mutex, since I said "any non main thread", right now we only have one, so no need to lock,

Re: [Spice-devel] [RFC] server: add main_dispatcher

2011-09-08 Thread Gerd Hoffmann
Hi, simple object system, not unions). Just an idea, could be changed later perhaps. socketpair is probably fine. First of all I see I forgot to add a mutex, since I said "any non main thread", right now we only have one, so no need to lock, but the idea is that it can also be called from

Re: [Spice-devel] [RFC] server: add main_dispatcher

2011-09-07 Thread Alon Levy
On Thu, Sep 08, 2011 at 02:24:32AM +0200, Marc-André Lureau wrote: > Hi Alon, > > On Thu, Sep 8, 2011 at 1:17 AM, Alon Levy wrote: > > --- > >  server/Makefile.am       |    2 + > >  server/main_dispatcher.c |  132 > > ++ > >  server/main_dispatcher.h

Re: [Spice-devel] [RFC] server: add main_dispatcher

2011-09-07 Thread Marc-André Lureau
Hi Alon, On Thu, Sep 8, 2011 at 1:17 AM, Alon Levy wrote: > --- >  server/Makefile.am       |    2 + >  server/main_dispatcher.c |  132 > ++ >  server/main_dispatcher.h |    9 +++ >  server/reds.c            |    5 ++- >  4 files changed, 147 insertion

[Spice-devel] [RFC] server: add main_dispatcher

2011-09-07 Thread Alon Levy
--- server/Makefile.am |2 + server/main_dispatcher.c | 132 ++ server/main_dispatcher.h |9 +++ server/reds.c|5 ++- 4 files changed, 147 insertions(+), 1 deletions(-) create mode 100644 server/main_dispatcher.c create m