[FileIndexScheduler] Stop the indexer when quit() is called via DBus
ClosedPublic

Authored by bruns on Jun 8 2019, 5:02 PM.

Details

Summary

The 'stop' flag was not set when the scheduler is quit, and the content
indexer thread would keep running until it had processed all documents
marked in the DB.

Test Plan

feed some files into the content indexer
try to stop the indexer, e.g. balooctl stop or using DBus
-> the content indexer should stop after the current batch

Diff Detail

Repository
R293 Baloo
Branch
scheduler
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 12576
Build 12594: arc lint + arc unit
bruns created this revision.Jun 8 2019, 5:02 PM
Restricted Application added projects: Frameworks, Baloo. · View Herald TranscriptJun 8 2019, 5:02 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
bruns requested review of this revision.Jun 8 2019, 5:02 PM
poboiko accepted this revision.Jun 10 2019, 9:30 AM

That's a nice catch!

This revision is now accepted and ready to land.Jun 10 2019, 9:30 AM
This revision was automatically updated to reflect the committed changes.
bruns added a comment.Jun 10 2019, 2:20 PM

Yes, mostly - the "after the current batch" caveat applies, so there may be still some delay.

That's probably fine!