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

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sun Aug 5 08:57:15 PDT 2012


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

--- Comment #26 from Adam Reichold <adamreichold at myopera.com> 2012-08-05 15:57:15 UTC ---
(In reply to comment #25)
> (In reply to comment #24)
> > 
> > Ouch, that seems quite a lot, i'll do a test if i have time
> 
> 1 second in comparison that it took 2:40 minutes to render it at all? And I
> haven't really measured it, just made a date; pdftoppm ...; date
> 
> > 
> > Well, i understand that having rendering work is great, but if we are going to
> > make it thread-safe it should be really thread-safe everywhere, i.e. can i ask
> > for the fonts of the document while it's rendering? That's the typical use case
> > were okular now blocks
> 
> When every thread has it's own XRef (Gfx) it shouldn't be need. It depends how
> "You" ask for fonts

Superficially seems so: I just tried calling Poppler::Document::fonts while
several threads were rendering and it did not lead to any problems or errors.
(I still block for the ::fonts call, it is really just
Poppler::Page::renderToImage the lives in a different thread than the GUI.)

> > 
> > Sure, i see the difference in the code, but why is that behaviour difference
> > needed?
> 
> The PDFDoc gives the file handle to FileStream but closes the handle itself, so
> I can't close it in the FileStream destructor without breaking that. But I need
> to close every additional file handle I need to open to get it thread safe, and
> the easiest way to ensure that is doing it in a destructor.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the Poppler-bugs mailing list