<br>I&#39;m splitting my last emails to make them more easily understandable.<br><br clear="all">We have the problem of running runners (not in queue, but running)
that can not be signalized to finish when a new query is launched and
thus, they are running on obsolete data. They are a bad thing (tm).<br>
<br>I am thinking about something like this:<br><br>- bool AbstractRunner::criticalSection<div id="1fsa" class="ArwC7c ckChnd">, AbstractRunner::setCriticalSection(bool) <br>setCriticalSection
will be set to true when a critical section of the runner is entered,
so far, that sections will be when the runner is modifying the
SearchContext, as locks will be held. <br>
<br>- Implement FindMatchesJob::requestAbort as <br>&nbsp;if (!m_runner-&gt;criticalSection())<br>{<br>&nbsp;&nbsp;&nbsp; isFinished(true):<br>&nbsp;&nbsp;&nbsp; emit(done)<br>}<br><br>I am not sure if this will be enough to make ThreadWeaver stop and delete this job but I think it will. </div>
The problem is that all the runners should be changed to use setCriticalSection (true) where needed. <br>Also a bad written runner can be killed in a critical section leading to a held lock.<br><br><br>-- <br>Jordi Polo Carres<br>
NLP laboratory - NAIST<br><a href="http://www.bahasara.org">http://www.bahasara.org</a><br>