anchor.diff:      fScanning := False;
       if Assigned(fOnComplete) then
         fOnComplete(Self);
  +  finally
  +    Unlock;
  +  end;
  +end;
  +
  +
  +//Scan was terminated
  +//No need to resort since that was done in last MapAdd event
  +procedure TKMapsCollection.ScanTerminate(Sender: TObject);
  +begin
  +  Lock;
  +  try
  +    fScanning := False;
     finally
       Unlock;
     end;
  
positive.code: //aOnMapAdd - signal that there's new map that should be added
  //aOnMapAddDone - signal that map has been added
  //aOnComplete - scan is complete
  constructor TTMapsScanner.Create(aMapFolders: TMapFolderSet; aOnMapAdd: TMapEvent; aOnMapAddDone, aOnComplete: TNotifyEvent);
  begin
    inherited Create(aMapFolders);
  
    Assert(Assigned(aOnMapAdd));
  
    fOnMapAdd := aOnMapAdd;
    fOnMapAddDone := aOnMapAddDone;
    OnTerminate := aOnComplete;
    FreeOnTerminate := False;
  end;
  
  
negative.code: 
  
  { TTCustomMapsScanner }
  constructor TTCustomMapsScanner.Create(aMapFolders: TMapFolderSet; aOnComplete: TNotifyEvent = nil);
  begin
    //Thread isn't started until all constructors have run to completion
    //so Create(False) may be put in front as well
    inherited Create(False);
  
    fMapFolders := aMapFolders;
    fOnComplete := aOnComplete;
    FreeOnTerminate := False;
  end;
  
  