<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://git.reviewboard.kde.org/r/121861/">https://git.reviewboard.kde.org/r/121861/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On Januar 5th, 2015, 10:37 nachm. CET, <b>David Faure</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Ah cool, I didn't know the Qt5 implementation of QFSW solved this. Nice.</p></pre>
</blockquote>
</blockquote>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">The motivation for KFileSystemWatcher is the following limitation:</p>
<ul style="padding: 0;text-rendering: inherit;margin: 0 0 0 1em;line-height: inherit;white-space: normal;">
<li style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">the maximum number of object handles is MAXIMUM_WAIT_OBJECTS (64) per thread.</li>
<li style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">"To wait on more than MAXIMUM_WAIT_OBJECTS handles, create a thread to wait</li>
<li style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">on MAXIMUM_WAIT_OBJECTS handles, then wait on that thread plus the other handles.</li>
<li style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">Use this technique to break the handles into groups of MAXIMUM_WAIT_OBJECTS."
*</li>
<li style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">QFileSystemWatcher is implemented as thread, so KFileSystemWatcher</li>
<li style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">allocates more QFileSystemWatcher instances on demand (and deallocates them later).
*/</li>
</ul>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">https://qt.gitorious.org/qt/qtbase/source/73a1e8c60d894701f34806cc4b847aa2814bf389:src/corelib/io/qfilesystemwatcher_win.cpp#L175 and ff looks to me like an implementation to avoid the above mentioned limitation </p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">line 177: <br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
if (thread->handles.count() < MAXIMUM_WAIT_OBJECTS) {
DEBUG() << "Added handle" << handle.handle << "for" << absolutePath << "to watch" << fileInfo.absoluteFilePath() << "to existing thread " << thread;
....
}
line 195:
if (!found) {
QWindowsFileSystemWatcherEngineThread *thread = new QWindowsFileSystemWatcherEngineThread();
DEBUG() << " ###Creating new thread" << thread << "(" << (threads.count()+1) << "threads)";
}</p></pre>
<br />
<p>- Ralf</p>
<br />
<p>On Januar 5th, 2015, 7:43 nachm. CET, Ralf Habacker wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: 1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
<tr>
<td>
<div>Review request for KDE Frameworks.</div>
<div>By Ralf Habacker.</div>
<p style="color: grey;"><i>Updated Jan. 5, 2015, 7:43 nachm.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
kcoreaddons
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Remove obsolate class KFileSystemWatcher, which is handled by Windows implementation of Qt5 QFileSystemWatcher.</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>src/lib/CMakeLists.txt <span style="color: grey">(b2b46b164097f2394957f99ec4fb97b52f2bbc96)</span></li>
<li>src/lib/io/kdirwatch.cpp <span style="color: grey">(71f1892180b51cf65426696b4ffe918a02debba0)</span></li>
<li>src/lib/io/kdirwatch_p.h <span style="color: grey">(12839fdf4af5312eae3a636cec73f9dd2a41057d)</span></li>
<li>src/lib/io/kdirwatch_win.cpp <span style="color: grey">(846e91ab1c932fbe1117ca6e3de3008f7f3a2130)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/121861/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>