Пример #1
0
 public AreaCVGraphDataCache()
 {
     _producerConsumer = new StackWorker <GraphDataProperties>(null, CacheData);
     _producerConsumer.RunAsync(MAX_THREADS, @"AreaCVGraphDataCache");
     _cacheInfo   = new CacheInfo();
     _tokenSource = new CancellationTokenSource();
 }
Пример #2
0
 public DetectionDataCache()
 {
     _stackWorker = new StackWorker <DataRequest>(null, CacheData);
     //single worker thread because we do not need to paralelize the calculations,
     //only to offload them from the UI thread
     _stackWorker.RunAsync(1, @"DetectionsDataCache");
     _tokenSource = new CancellationTokenSource();
     _datas       = new ConcurrentQueue <DetectionPlotData>();
     SetCacheStatus(CacheStatus.idle, string.Empty);
 }