On Mon, Apr 16, 2007 at 12:54:25PM -0500, Nathan Ingersoll wrote: > Nice work Vincent. As we discussed on IRC, there are a few changes to > the API I would like to propose to reduce the differences between the > two engines (Xlib or XCB) as it becomes more complete.
I agree with Nathan that having different semantics in the two backends could cause confusion, and the current difference does constitute an API break. Also, I have a few other questions about the current implementation. prefetch() currently sends a request to the server, and adds a 'cookie' to the end of a queue to track this request. fetch() shifts a cookie off the front of the queue, and blocks until a matching response has been received, placing the reply in a global variable get() reads the global var populated by _fetch() and returns the actual data we want This requires a few things that aren't obvious from the api. A) fetch() and get() must be called in pairs. if you fetch() twice, you lose the reply from the first. e.g. you must do (assuming the requisite prefetches() have already been called): prop1_fetch(); prop1_get(); prop2_fetch(); prop2_get(); The following will not work: prop1_fetch(); prop2_fetch(); prop1_get(); prop2_get(); (both get() calls will use the reply from prop2_fetch()) B) although a bunch of prefetch() calls can be queued up, the corresponding fetch() calls must occur in the same order. e.g. one must do: /* queue up some requests */ prop1_prefetch(); prop2_prefetch(); /* some time later */ prop1_fetch(); prop1_get(); prop2_fetch(); prop2_get(); Since the whole point of this api is to make things asynchronous, the prefetches are likely to be in different parts of the code than the fetches. This would in the least have to be very clearly documented... Were these requirements intended? Or just side effects of the implementation? Brian ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ enlightenment-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
