[cairo] Solid surface cache causing cross-thread unhappiness
cworth at cworth.org
Fri Mar 2 02:13:18 PST 2007
On Thu, 1 Mar 2007 08:53:15 +0000, "Damian Dixon" wrote:
> Sorry about the direct email - I need to change my email address with the
> list... (I suspect this will be lost to the list).
No worries, Damian. I'm replying here primarily so that people will be
able to see the message you wrote. And in the meantime, I've also
whitelisted your address so you should be able to post again, (even if
you don't bother subscribing with the new address).
Your techniques below sound useful. Thanks for sharing them.
> I have just finished writing a web-map-server, for the company I work for,
> which can have N number of threads using X-lib calls. Not using Cario
> The approach I took was to open a display connection for each thread.
> I then allocate the X-lib resources required for each thread via that
> display connection. I don't mix the allocations or attempt to reuse the
> X-lib resources between threads even if the opened display's are to the same
> I also cache X-lib resources based on a display connection. Which means I
> avoid any need to lock resources. I suspect you could probably move the
> caches to the cario surface and avoid static cache's with locks.
> I have had 15 threads running with a very heavy load quite happily using
> this approach.
> One other thing I do is that when checking for compatible surfaces I check
> the display, screen, visual and colourmap. Just checking the Screen is not
> enough IMO if someone has picked a non-default visual and created their own
> Damian Dixon
PS. It's amazing how hands will so naturally type "cario" instead of
"cairo". I think it took me many months to work that bug out of my
muscles, (and I still tun into it every once in a while). I'm quite
sure this is a Qwerty artefact, ("car" being left-handed an "io" being
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20070302/b22f487f/attachment.pgp
More information about the cairo