D16265: [Scheduler] Use flag to track when a runner is going idle

Stefan BrĂ¼ns noreply at phabricator.kde.org
Tue Oct 16 23:12:54 BST 2018


bruns created this revision.
bruns added reviewers: Baloo, Frameworks, poboiko, ngraham.
Herald added projects: Frameworks, Baloo.
Herald added a subscriber: kde-frameworks-devel.
bruns requested review of this revision.

REVISION SUMMARY
  Only one runner should be queued/running at a given time, but the current
  condition "m_threadPool.activeThreadCount == 0" is to strong, as the
  done() signal is fired from the runner thread while it is still alive and
  may be processed before the thread has exited.
  
  Set a flag when the runner is finished, and use this to guard from
  scheduling/enqueuing multiple runners. It is fine to enqueue another
  runner while the old is cleaning up, the new one will become active
  afterwards.
  
  Alternative approach to D15959 <https://phabricator.kde.org/D15959>.

TEST PLAN
  start `balooctl monitor~
  touch a file -> file is indexed, scheduler goes idle afterwards
  touch multiple files, new files -> indexing, idle

REPOSITORY
  R293 Baloo

BRANCH
  mimetype_handling

REVISION DETAIL
  https://phabricator.kde.org/D16265

AFFECTED FILES
  src/file/fileindexscheduler.cpp
  src/file/fileindexscheduler.h

To: bruns, #baloo, #frameworks, poboiko, ngraham
Cc: kde-frameworks-devel, ashaposhnikov, michaelh, astippich, spoorun, ngraham, bruns, abrahams
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20181016/d68ece2c/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list