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