<table><tr><td style="">sander added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D7595" rel="noreferrer">View Revision</a></tr></table><br /><div><div><p>From merely looking at the patches, I like this one better than Albert's.  In Albert's patch, the fact that you have to set m_areWeReloading at every exit of the method slotDoFileDirty does feel like breakage waiting to happen.</p>

<p>On the other hand, Albert's objection "Using a mutex when threads are not involved is wrong in my book" is not without reason either.  Casual readers of the code will see the mutex and expect there to be threading.  I therefore suggest to expand the comment in part.cpp:1773 to clearly state why the mutex is needed, and why it does not have anything to do with threading.</p>

<p>Is that a reasonable compromise?</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R223 Okular</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D7595" rel="noreferrer">https://phabricator.kde.org/D7595</a></div></div><br /><div><strong>To: </strong>rkflx, Okular<br /><strong>Cc: </strong>sander, aacid<br /></div>