Example #1
0
        void MultiThreadedFilter(FilterParams filterParams, List<int> filterResultLines, List<int> lastFilterLinesList, List<int> filterHitList)
        {
            ColumnizerCallback callback = new ColumnizerCallback(this);
            FilterStarter fs = new FilterStarter(callback, Environment.ProcessorCount + 2);
            fs.FilterHitList = _filterHitList;
            fs.FilterResultLines = _filterResultList;
            fs.LastFilterLinesList = _lastFilterLinesList;
            BackgroundProcessCancelHandler cancelHandler = new FilterCancelHandler(fs);
            RegisterCancelHandler(cancelHandler);
            long startTime = Environment.TickCount;

            fs.DoFilter(filterParams, 0, CurrentLogFileReader.LineCount, FilterProgressCallback);

            long endTime = Environment.TickCount;
#if DEBUG
            Logger.logInfo("Multi threaded filter duration: " + ((endTime - startTime)) + " ms.");
#endif
            DeRegisterCancelHandler(cancelHandler);
            StatusLineText("Filter duration: " + ((endTime - startTime)) + " ms.");
        }
		public FilterCancelHandler(FilterStarter filterStarter)
		{
			this.filterStarter = filterStarter;
		}
Example #3
0
 public FilterCancelHandler(FilterStarter filterStarter)
 {
     this.filterStarter = filterStarter;
 }