<table><tr><td style="">ahiemstra 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/D24359">View Revision</a></tr></table><br /><div><div><p>Note that <a href="https://bugzilla.opensuse.org/show_bug.cgi?id=1152638" class="remarkup-link" target="_blank" rel="noreferrer">https://bugzilla.opensuse.org/show_bug.cgi?id=1152638</a> says <tt style="background: #ebebeb; font-size: 13px;">pcap_breakloop()</tt> is unsupported when called from multiple threads. However, the actual libpcap documentation states:</p>
<blockquote style="border-left: 3px solid #a7b5bf; color: #464c5c; font-style: italic; margin: 4px 0 12px 0; padding: 4px 12px; background-color: #f8f9fc;"><p>Note also that, in a multi-threaded application, if one thread is blocked in pcap_dispatch(), pcap_loop(), pcap_next(3PCAP), or pcap_next_ex(3PCAP), a call to pcap_breakloop() in a different thread will not unblock that thread.</p></blockquote>
<p>Which is a bit different, as it implies (to me) that the loop will still exit the next time the thread is woken up from its blocking call. Which is fine, the thread will be woken up when the next packet arrives and then exit.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R106 KSysguard</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D24359">https://phabricator.kde.org/D24359</a></div></div><br /><div><strong>To: </strong>ahiemstra, Plasma<br /><strong>Cc: </strong>plasma-devel, LeGast00n, The-Feren-OS-Dev, jraleigh, fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart<br /></div>