[cp-patches] Re: RFC: deadlock with
mark at klomp.org
Sun Jun 11 11:22:20 UTC 2006
On Sun, 2006-06-11 at 05:05 +0200, Sven de Marothy wrote:
> On Sat, 2006-06-10 at 23:17 +0200, Mark Wielaard wrote:
> > I was seeing deadlocks in some cases with ComponentGraphics.drawImage().
> > ComponentGraphics takes the gdk lock and then calls super.drawImage().
> > But in some cases when the image isn't a BufferedImage CairoGraphics
> > would recurse into drawImage() again. And since the gdk lock isn't
> > reentrant that would cause a deadlock. There was a second problem if the
> > image was the error image, in that case it wouldn't have a ImageProducer
> > and later on in CairoGraphics.drawImage() an Exception would be thrown.
> > In that case the gdk lock would never be released. To prevent against
> > such situations this patch also moves all operations that have to
> > operate with the gdk lock held into a try-finally block to make sure the
> > lock is always released.
> Looks OK.
> But on a seperate but related note, could we move that "error
> image" stuff to a seperate dummy class instead though?
Yes, that would be a good idea.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://developer.classpath.org/pipermail/classpath-patches/attachments/20060611/9564cb41/attachment.pgp
More information about the Classpath-patches