Exemple #1
0
 protected internal QueueDataSource(string dataSourceName, IDataProvider <T> dataProvider, ushort priority)
 {
     Name           = dataSourceName;
     Priority       = priority;
     _signal        = new DataAvailableResetEvent(false, dataSourceName, this);
     SafeWaitHandle = _signal.SafeWaitHandle;
     dataProvider.AddResetEvent(_signal);
     _fetchEvent        = new AutoResetEvent(false);
     _semaphore         = new ManualResetEvent(false);
     _cts               = new CancellationTokenSource();
     _dataLoadSemaphore = new ManualResetEvent(true);
 }
Exemple #2
0
 public void AddResetEvent(DataAvailableResetEvent resetEvent)
 {
     _dataSourceWaitHandleList.Add(resetEvent);
 }