[cairo] [PATCH 3/3] snapshot: fix the race condition. Protect the whole replaying function.

Behdad Esfahbod behdad at behdad.org
Fri May 25 16:01:49 PDT 2012


On 05/25/2012 07:10 AM, Zhigang Gong wrote:
> No, no deadlock here. We use rdlock here, not wrlock. Rdlock will not
> block each other. Oh, wait, for those platforms doesn't have a rwlock
> implementation
> and use a mutex instead, we do have a deadlock condition here....
> emm any comments for that situation?

You can implement a rwlock using two mutexes and a counter...

behdad


More information about the cairo mailing list