27 instantiations of Shared
System.Core (27)
System\Linq\Parallel\Enumerables\RangeEnumerable.cs (1)
106m_currentCount = new Shared<int>(-1);
System\Linq\Parallel\Enumerables\RepeatEnumerable.cs (1)
110m_currentIndex = new Shared<int>(-1);
System\Linq\Parallel\Merging\OrderPreservingMergeHelper.cs (1)
51m_results = new Shared<TInputOutput[]>(null);
System\Linq\Parallel\Partitioning\PartitionedDataSource.cs (5)
177Shared<int> sharedCurrentIndex = new Shared<int>(0); 178Shared<int> sharedPartitionCount = new Shared<int>(partitionCount); 179Shared<bool> sharedExeceptionTracker = new Shared<bool>(false); 379m_currentIndex = new Shared<int>(m_startIndex); 557m_currentIndex = new Shared<int>(m_startIndex);
System\Linq\Parallel\QueryOperators\Binary\ExceptQueryOperator.cs (1)
182m_outputLoopCount = new Shared<int>(0);
System\Linq\Parallel\QueryOperators\Binary\IntersectQueryOperator.cs (1)
171m_outputLoopCount = new Shared<int>(0);
System\Linq\Parallel\QueryOperators\Binary\UnionQueryOperator.cs (1)
227m_outputLoopCount = new Shared<int>(0);
System\Linq\Parallel\QueryOperators\QueryOpeningEnumerator.cs (1)
48private readonly Shared<bool> m_topLevelDisposedFlag = new Shared<bool>(false); //a shared<bool> so that it can be referenced by others.
System\Linq\Parallel\QueryOperators\QuerySettings.cs (1)
144return WithPerExecutionSettings(new CancellationTokenSource(), new Shared<bool>(false));
System\Linq\Parallel\QueryOperators\Unary\AnyAllSearchOperator.cs (1)
110Shared<bool> resultFoundFlag = new Shared<bool>(false);
System\Linq\Parallel\QueryOperators\Unary\ContainsSearchOperator.cs (1)
103Shared<bool> resultFoundFlag = new Shared<bool>(false);
System\Linq\Parallel\QueryOperators\Unary\DefaultIfEmptyQueryOperator.cs (1)
67Shared<int> sharedEmptyCount = new Shared<int>(0);
System\Linq\Parallel\QueryOperators\Unary\DistinctQueryOperator.cs (1)
159m_outputLoopCount = new Shared<int>(0);
System\Linq\Parallel\QueryOperators\Unary\ElementAtQueryOperator.cs (1)
87Shared<bool> resultFoundFlag = new Shared<bool>(false);
System\Linq\Parallel\QueryOperators\Unary\ForAllOperator.cs (1)
55Shared<bool> dummyTopLevelDisposeFlag = new Shared<bool>(false);
System\Linq\Parallel\QueryOperators\Unary\IndexedWhereQueryOperator.cs (1)
176m_outputLoopCount = new Shared<int>(0);
System\Linq\Parallel\QueryOperators\Unary\ReverseQueryOperator.cs (1)
138m_bufferIndex = new Shared<int>(0);
System\Linq\Parallel\QueryOperators\Unary\SingleQueryOperator.cs (1)
66Shared<int> totalElementCount = new Shared<int>(0);
System\Linq\Parallel\QueryOperators\Unary\TakeOrSkipQueryOperator.cs (1)
237m_bufferIndex = new Shared<int>(-1);
System\Linq\Parallel\QueryOperators\Unary\TakeOrSkipWhileQueryOperator.cs (1)
340m_bufferIndex = new Shared<int>(-1);
System\Linq\Parallel\QueryOperators\Unary\WhereQueryOperator.cs (1)
141m_outputLoopCount = new Shared<int>(0);
System\Linq\Parallel\Scheduling\CancellationState.cs (1)
56TopLevelDisposedFlag = new Shared<bool>(false); //it would always be initialised to false, so no harm doing it here and avoid #if around constructors.
System\Linq\ParallelEnumerable.cs (1)
4412.WithPerExecutionSettings(new CancellationTokenSource(), new System.Linq.Parallel.Shared<bool>(false));
45 references to Shared
System.Core (45)
System\Linq\Parallel\Enumerables\RangeEnumerable.cs (1)
85private Shared<int> m_currentCount; // The 0-based index of the current value. [allocate in moveNext to avoid false-sharing]
System\Linq\Parallel\Enumerables\RepeatEnumerable.cs (1)
90private Shared<int> m_currentIndex; // The number of times we have already repeated it. [allocate in moveNext to avoid false-sharing]
System\Linq\Parallel\Merging\OrderPreservingMergeHelper.cs (1)
31private Shared<TInputOutput[]> m_results; // The array where results are stored.
System\Linq\Parallel\Partitioning\PartitionedDataSource.cs (11)
177Shared<int> sharedCurrentIndex = new Shared<int>(0); 178Shared<int> sharedPartitionCount = new Shared<int>(partitionCount); 179Shared<bool> sharedExeceptionTracker = new Shared<bool>(false); 347private Shared<int> m_currentIndex; // The current index (lazily allocated). 525private Shared<int> m_currentIndex; // The current index (lazily allocated). 584private readonly Shared<int> m_currentIndex; // The index shared by all. 585private readonly Shared<int> m_activeEnumeratorsCount; // How many enumerators over the same source have not been disposed yet? 586private readonly Shared<bool> m_exceptionTracker; 614IEnumerator<T> source, Shared<bool> exceptionTracker, object sourceSyncLock, Shared<int> currentIndex, Shared<int> degreeOfParallelism)
System\Linq\Parallel\QueryOperators\Binary\ExceptQueryOperator.cs (1)
148private Shared<int> m_outputLoopCount;
System\Linq\Parallel\QueryOperators\Binary\IntersectQueryOperator.cs (1)
138private Shared<int> m_outputLoopCount;
System\Linq\Parallel\QueryOperators\Binary\UnionQueryOperator.cs (1)
195private Shared<int> m_outputLoopCount;
System\Linq\Parallel\QueryOperators\QueryOpeningEnumerator.cs (1)
48private readonly Shared<bool> m_topLevelDisposedFlag = new Shared<bool>(false); //a shared<bool> so that it can be referenced by others.
System\Linq\Parallel\QueryOperators\QuerySettings.cs (1)
147internal QuerySettings WithPerExecutionSettings(CancellationTokenSource topLevelCancellationTokenSource, Shared<bool> topLevelDisposedFlag)
System\Linq\Parallel\QueryOperators\Unary\AnyAllSearchOperator.cs (3)
110Shared<bool> resultFoundFlag = new Shared<bool>(false); 158private readonly Shared<bool> m_resultFoundFlag; // Whether to cancel the search for elements. 166Func<TInput, bool> predicate, int partitionIndex, Shared<bool> resultFoundFlag,
System\Linq\Parallel\QueryOperators\Unary\ContainsSearchOperator.cs (3)
103Shared<bool> resultFoundFlag = new Shared<bool>(false); 145private readonly Shared<bool> m_resultFoundFlag; // Whether to cancel the operation. 153IEqualityComparer<TInput> comparer, int partitionIndex, Shared<bool> resultFoundFlag,
System\Linq\Parallel\QueryOperators\Unary\DefaultIfEmptyQueryOperator.cs (3)
67Shared<int> sharedEmptyCount = new Shared<int>(0); 115private Shared<int> m_sharedEmptyCount; // The number of empty partitions. 125Shared<int> sharedEmptyCount, CountdownEvent sharedLatch, CancellationToken cancelToken)
System\Linq\Parallel\QueryOperators\Unary\DistinctQueryOperator.cs (1)
129private Shared<int> m_outputLoopCount; // Allocated in MoveNext to avoid false sharing.
System\Linq\Parallel\QueryOperators\Unary\ElementAtQueryOperator.cs (3)
87Shared<bool> resultFoundFlag = new Shared<bool>(false); 174private Shared<bool> m_resultFoundFlag; // Whether to cancel the operation. 182int index, Shared<bool> resultFoundFlag,
System\Linq\Parallel\QueryOperators\Unary\ForAllOperator.cs (1)
55Shared<bool> dummyTopLevelDisposeFlag = new Shared<bool>(false);
System\Linq\Parallel\QueryOperators\Unary\IndexedWhereQueryOperator.cs (1)
149private Shared<int> m_outputLoopCount;
System\Linq\Parallel\QueryOperators\Unary\ReverseQueryOperator.cs (1)
115private Shared<int> m_bufferIndex; // Our current index within the buffer. [allocate in moveNext to avoid false-sharing]
System\Linq\Parallel\QueryOperators\Unary\SingleQueryOperator.cs (3)
66Shared<int> totalElementCount = new Shared<int>(0); 108private Shared<int> m_totalElementCount; // The total count of elements found. 115Func<TSource, bool> predicate, Shared<int> totalElementCount)
System\Linq\Parallel\QueryOperators\Unary\TakeOrSkipQueryOperator.cs (1)
165private Shared<int> m_bufferIndex; // Our current index within the buffer. [allocate in moveNext to avoid false-sharing]
System\Linq\Parallel\QueryOperators\Unary\TakeOrSkipWhileQueryOperator.cs (1)
223private Shared<int> m_bufferIndex; // Our current index within the buffer. [allocate in moveNext to avoid false-sharing]
System\Linq\Parallel\QueryOperators\Unary\WhereQueryOperator.cs (1)
112private Shared<int> m_outputLoopCount;
System\Linq\Parallel\Scheduling\CancellationState.cs (1)
51internal Shared<bool> TopLevelDisposedFlag;
System\Linq\Parallel\Scheduling\OrderPreservingSpoolingTask.cs (3)
31private Shared<TInputOutput[]> m_results; // The destination array cell into which data is placed. 49Shared<TInputOutput[]> results, SortHelper<TInputOutput> sortHelper) : 76Shared<TInputOutput[]> results, TaskScheduler taskScheduler)