[Poppler-bugs] [Bug 50992] library should be thread-safe
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Mon Sep 24 23:52:44 PDT 2012
https://bugs.freedesktop.org/show_bug.cgi?id=50992
--- Comment #46 from Thomas Freitag <Thomas.Freitag at alfa.de> ---
(In reply to comment #45)
> (In reply to comment #43)
> > Created attachment 67636 [details] [review] [review]
> > more changes to get qt library thread safe
> >
> > This patch also inlcudes the changes from Adam. I went through the code of
> > okular and tried to make all calls of the poppler qt library thread safe.
>
> Just two question whether I understand this correctly: This patch aims to
> make all (or just some and if so which) methods exposed through the Qt4
> frontend by Poppler::Document and Poppler::Page thread-safe, i.e. I could
> share my document instance over several threads concurrently calling stuff
> like renderToImage and search?
The goal is all (sharing document over threads, NOT pages), and if I haven't
missed one, I'm quite close. But I'm still working on the annotation stuff.
>
> And I am supposed to check the POPPLER_QT4_THREADSAFE macro to find out
> whether I need to lock document access? So for example:
>
> #ifndef POPPLER_QT4_THREADSAFE
> // locking goes here
> #endif
Yes. Have a look at the okular patch. It calls lockDocument / releaseDocument
which completely locks / unlocks if the macro isn't set but just calls
incRefCnt / decRefCnt to protect it against deletion otherwise.
>
> // make Poppler do something
>
> Best regards, Adam.
>
> P.S.: The documentation comments have the "since 0.22" tag, is there a
> chance this will make it into 0.22 even though 0.21 was already released?
I'm not sure, we need to ask Albert. If we aren't able to commit it before
0.21.2 we have to change the tag to 0.24 :-)
--
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/20120925/cba9e00d/attachment.html>
More information about the Poppler-bugs
mailing list