public NormalizeData(EventLoggerAccess log, DetectorsDataAccess dataAccess, Calibration calibration) { _log = log; _dataAccess = dataAccess; _calibration = calibration; _objectSearch = new ObjectSearch(log, dataAccess, _calibration); _rawDataColl = new BlockingCollection <DataInfo>(); _normalizeThread = Threads.Create(NormalizeAgent, ref _normalizeEnd, "Normalization thread"); _normalizeThread.Start(); }
public NormalizeData(EventLoggerAccess log, DetectorsDataAccess dataAccess, Calibration calibration) { _log = log; _dataAccess = dataAccess; _calibration = calibration; _objectSearch = new ObjectSearch(log, dataAccess, _calibration); _rawDataColl = new BlockingCollection<DataInfo>(); _normalizeThread = Threads.Create(NormalizeAgent, ref _normalizeEnd, "Normalization thread"); _normalizeThread.Start(); }
public void Dispose() { _normalizeCancel.Cancel(); try { if (/*exists (avoid first try exceptions)?*/ _normalizeThread != null) { _normalizeThread = Threads.Dispose(_normalizeThread, ref _normalizeEnd); } } catch { } finally { _normalizeThread = null; } try { if (/*exists (avoid first try exceptions)?*/ _objectSearch != null) { _objectSearch.Dispose(); } } catch { } finally { _objectSearch = null; } }
public void Dispose() { _normalizeCancel.Cancel(); try { if (/*exists (avoid first try exceptions)?*/ _normalizeThread != null) _normalizeThread = Threads.Dispose(_normalizeThread, ref _normalizeEnd); } catch { } finally { _normalizeThread = null; } try { if (/*exists (avoid first try exceptions)?*/ _objectSearch != null) _objectSearch.Dispose(); } catch { } finally { _objectSearch = null; } }