示例#1
0
 private void StartWorkItem(T item)
 {
     if (!_dispatchQueue.TryQueueWorkItem(() => _handler(item, EndWorkItem)))
     {
         throw new NotSupportedException();
     }
 }
示例#2
0
 private bool TryStartWorkItem(T item)
 {
     return(_dispatchQueue.TryQueueWorkItem(() => _handler(item, EndWorkItem)));
 }