[Xcb] a question about request and reply

Vincent Torri Vincent.Torri at iecn.u-nancy.fr
Mon Dec 19 12:14:10 PST 2005



On Mon, 19 Dec 2005, Jamey Sharp wrote:

> On Thu, Dec 15, 2005 at 08:25:35AM +0100, Vincent Torri wrote:
> > Hey,
>
> Hi Vincent! Sorry I missed this: thanks for reminding me about it.
>
> > I've attached a small example of what i've done for ecore.
> >
> > the api is quite simple :
> > * init/shutdown function
> > * add a cookie
> > * return a reply
> > * decrease the memory consumption if too many cookies have been added
> > (_flush function)
> >
> > I've used a "generic" cookie, but i want to use the sequence later.
>
> I still don't understand what you're trying to accomplish. I've attached
> a simple patch for your example code that lets it do exactly what it's
> doing now, with complete type safety and without calling any of the code
> in ecore_xcb_request.c.
>
> I notice that you haven't implemented a queue, which is what I thought
> you were going for. You've implemented a table of cookies instead, with
> sequentially-allocated keys. This table isn't buying you any performance
> or latency hiding. What were you trying for?

well, a queue is just a list, right ? here, it's an array i find it more
convenient to use rather than lists.

my aim was to make the reply system independant to the reply functions
(which is given when we send the request) as the replies might be called
by a callback. It's then impossible to know wich reply functions we have
to call.

Vincent


More information about the Xcb mailing list