quicksilver/Quicksilver — pull request #1316 by pjrobertson (2013-01-10 17:02:51+00:00)
Title: Perform indexIsValid on the scanQueue

Avoids cases where indexDate is modified by saveIndex when being accessed by indexIsValid

Performing indexIsValid on the scan queue could quite likely cause a lock up of QS. This was the case for the QSProcessSource, and is fixed in this commit.
This is not great, and could potentially cause a lot of lock ups in QS, but my reasoning is that we never object sources to recursively rescan themselves, and this will bring them to light (albeit in an annoying way to the user).

e.g. The first time QSProcessSource.m was sent `objectsForEntry:`, it loaded all the processes into a mutable dict (`processes`) and subsequently sent an `invalidateSelf` message, causing it to be rescanned *again* whilst it's being scanned for the 1st time. Not something we want to do.

If you're completely unhappy with this, we should keep the QSProcessSource changes in, but use some kind of BOOL (say `isSavingIndex`) that would be set on `saveIndex` to `YES`.

Really, the fundamental problem is that `indexIsValid` is being called whilst the catalog is being saved (i.e. the catalog is being scanned whilst it is being saved) so we should fix that.
I'm throwing this out there to get a discussion going.

View the crash log [here](https://gist.github.com/4503804)