internal ConcurrentDictionary <TKey, ConcurrentQueue <TElement> > GetStore() { var store = new ConcurrentDictionary <TKey, ConcurrentQueue <TElement> > (); ParallelExecuter.ProcessAndBlock(Parent, (e, c) => { ConcurrentQueue <TElement> queue = store.GetOrAdd(keySelector(e), (_) => new ConcurrentQueue <TElement> ()); queue.Enqueue(elementSelector(e)); }); return(store); }
IList <T> GetAggregatedList(out int partitionCount) { AggregationList <T> result = null; partitionCount = -1; ParallelExecuter.ProcessAndAggregate <T, IList <T> > (Parent, () => new List <T> (), LocalCall, (ls) => { result = new AggregationList <T> (ls); }); return(result); }