[Xcb] Interning multiple atoms w/ one function call (alla XInternAtoms)

Jamey Sharp jamey at minilop.net
Thu Aug 11 02:57:02 EST 2005


On Wed, 2005-08-10 at 06:30 +0200, Vincent Torri wrote:
> On Tue, 9 Aug 2005, Jamey Sharp wrote:
> > That said, I implemented exactly the function being asked for in the old
> > XCL source; somebody could check it out of the xcl module in CVS if they
> > wanted to.
> 
> in this xcl function, why allocating memory (for cs) and doing 2 loops ?
> That is, why not always doing something like in the case when the
> allocation of cs fails ?

Because the whole point of the XInternAtoms function is to not block on
any of the replies until all of the requests have been made. The
fallback code, when memory allocation fails, is very slow: it waits for
N round-trips to the server, if N atoms are requested. The other code
waits for 1 round-trip, no matter how many atoms are requested.

--Jamey
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.freedesktop.org/archives/xcb/attachments/20050810/62b457cc/attachment.pgp


More information about the xcb mailing list