'"on_scan_complete" (optional), if specified, is called when
a ScanRequest is completed.
TODO: add back the requestStartCB and completedCB (for batch updates)'

def __init__(self, mgr, on_scan_complete=None):

    threading.Thread.__init__(self, name='codeintel    indexer')
    self.setDaemon(True)
    self.mgr = mgr
    self.on_scan_complete = on_scan_complete
    if (self.mode == self.MODE_DAEMON):
        self._requests = _StagingRequestQueue()
    else:
        self._requests = _UniqueRequestPriorityQueue()
    self._stopping = False
    self._resumeEvent = None
