[cairo] Test case for threaded copy from the same surface (python)

Arjen Nienhuis a.g.nienhuis at gmail.com
Fri Dec 4 12:54:51 PST 2009


>arjennienh: I try to copy from one image from two threads
>arjennienh: and it breaks
>arjennienh: could someone give me some help?
>arjennienh: I made a minimal testcase in python to show the problem.
>arjennienh: I ran it with the latest version from the repository
>arjennienh: I also tried to find the problem in the source code of cairo.
>arjennienh: But now I'm not even sure if it is even supported at all.
>arjennienh: Does anyone know?
>   Company: it's not supported yet
>   Company: as in: if it works, that's by accident
>   Company: it's one of the things we're trying to fix for 1.10
>   Company: so if you could provide your testcase, that'd be awesome

This version actually works because the threads are serialized. Change
the order of the start and join lines to see the breakage:

t1.start()
t2.start()
t1.join()
t2.join()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cairo_thread_paint.py
Type: application/octet-stream
Size: 1083 bytes
Desc: not available
Url : http://lists.cairographics.org/archives/cairo/attachments/20091204/209c5b7e/attachment.obj 


More information about the cairo mailing list