<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - library should be thread-safe"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=50992#c46">Comment # 46</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - library should be thread-safe"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=50992">bug 50992</a>
              from <span class="vcard"><a class="email" href="mailto:Thomas.Freitag@alfa.de" title="Thomas Freitag <Thomas.Freitag@alfa.de>"> <span class="fn">Thomas Freitag</span></a>
</span></b>
        <pre>(In reply to <a href="show_bug.cgi?id=50992#c45">comment #45</a>)
<span class="quote">> (In reply to <a href="show_bug.cgi?id=50992#c43">comment #43</a>)
> > Created <span class=""><a href="attachment.cgi?id=67636" name="attach_67636" title="more changes to get qt library thread safe">attachment 67636</a> <a href="attachment.cgi?id=67636&action=edit" title="more changes to get qt library thread safe">[details]</a></span> <a href='page.cgi?id=splinter.html&bug=50992&attachment=67636'>[review]</a> [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?</span >

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.

<span class="quote">> 
> 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</span >

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.

<span class="quote">> 
> // 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?</span >

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 :-)</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>