[Poppler-bugs] [Bug 50992] library should be thread-safe

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Sep 27 00:03:09 PDT 2012


https://bugs.freedesktop.org/show_bug.cgi?id=50992

--- Comment #57 from Thomas Freitag <Thomas.Freitag at alfa.de> ---
(In reply to comment #54)
> Some quick comments before i have a change to try it in 2 hours or so.
> 
> The Annot.cc change does not belong here, right?

Yes and no: I encountered that problem when I tried to get page rendering
thread safe and still had problems with it. BUT it's definitely safer to have
it in.

> 
> The recursion in Stream::addFilters does not belong here either i'd say, no?

On contrary, it does belong here: Stream::addFilters can be called by
XRef::fetch and dictLookup can call XRef::fetch, and because the goo mutex
implementation does not know a recursive mutex we will run in a dead lock
without it.

> 
> GBool fCopy seems a bad name for something that decides if the xref is going
> to be copied, can we call it copyXRef? Same for fMT

I'll change it.

> 
> Seems a bit weird leaving the non thread safe versions of getDocInfo and
> getDocInfoNF there, no? What's the use of them?

I think I miss something. What do You mean?

> 
> In the qt4 frontend we don't need the incRef and decRef, that's poor's man
> solution. Users of qt4 frontend can put the Document * in a QSharedPointer
> to get the reference counting properly done (which by the way we should not
> need in Okular since the code ensure the PDF generator will only be deleted
> once all the threads have finished)

I wasn't really lucky with it, so if not needed I'm glad to remove it again.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/poppler-bugs/attachments/20120927/65217445/attachment.html>


More information about the Poppler-bugs mailing list