Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Core / System / Linq / Parallel / Partitioning / UnorderedHashRepartitionStream.cs / 1305376 / UnorderedHashRepartitionStream.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== // =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ // // UnorderedHashRepartitionStream.cs // //[....] // // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- using System.Collections.Generic; using System.Threading; namespace System.Linq.Parallel { internal class UnorderedHashRepartitionStream: HashRepartitionStream { //---------------------------------------------------------------------------------------- // Creates a new partition exchange operator. // internal UnorderedHashRepartitionStream( PartitionedStream inputStream, Func keySelector, IEqualityComparer keyComparer, IEqualityComparer elementComparer, CancellationToken cancellationToken) : base(inputStream.PartitionCount, Util.GetDefaultComparer (), keyComparer, elementComparer) { // Create our array of partitions. m_partitions = new HashRepartitionEnumerator [inputStream.PartitionCount]; // Initialize state shared among the partitions. A latch and a matrix of buffers. Note that // the actual elements in the buffer array are lazily allocated if needed. CountdownEvent barrier = new CountdownEvent(inputStream.PartitionCount); ListChunk >[,] valueExchangeMatrix = new ListChunk >[inputStream.PartitionCount, inputStream.PartitionCount]; // Now construct each partition object. for (int i = 0; i < inputStream.PartitionCount; i++) { m_partitions[i] = new HashRepartitionEnumerator ( inputStream[i], inputStream.PartitionCount, i, keySelector, this, barrier, valueExchangeMatrix, cancellationToken); } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DataFormats.cs
- PseudoWebRequest.cs
- BuildProviderUtils.cs
- XmlElementAttributes.cs
- EventMappingSettingsCollection.cs
- TransformerTypeCollection.cs
- CustomLineCap.cs
- StateMachineWorkflowInstance.cs
- SponsorHelper.cs
- IxmlLineInfo.cs
- MaskedTextBox.cs
- MouseActionValueSerializer.cs
- KeyBinding.cs
- RuntimeConfig.cs
- QilTypeChecker.cs
- OdbcConnection.cs
- ReturnEventArgs.cs
- DataServiceOperationContext.cs
- ProviderConnectionPointCollection.cs
- WebPartConnectionsConfigureVerb.cs
- HistoryEventArgs.cs
- HttpCapabilitiesEvaluator.cs
- NameValuePair.cs
- StrokeSerializer.cs
- ArrayElementGridEntry.cs
- NameNode.cs
- DebugViewWriter.cs
- XPathNodePointer.cs
- NonPrimarySelectionGlyph.cs
- MetadataItem_Static.cs
- LeafCellTreeNode.cs
- OneToOneMappingSerializer.cs
- EnvironmentPermission.cs
- LinkLabelLinkClickedEvent.cs
- ContentTextAutomationPeer.cs
- PlatformCulture.cs
- HtmlMeta.cs
- XmlSerializerAssemblyAttribute.cs
- DictionaryEntry.cs
- BuildProvidersCompiler.cs
- COM2ColorConverter.cs
- ArrayTypeMismatchException.cs
- DiffuseMaterial.cs
- QilInvokeLateBound.cs
- RectAnimationClockResource.cs
- DataRowComparer.cs
- SourceSwitch.cs
- Attributes.cs
- DoubleConverter.cs
- WorkflowRuntimeElement.cs
- ReceiveSecurityHeaderEntry.cs
- RevocationPoint.cs
- JapaneseCalendar.cs
- ListControlDataBindingHandler.cs
- RNGCryptoServiceProvider.cs
- QilList.cs
- DynamicILGenerator.cs
- OperatorExpressions.cs
- SimpleRecyclingCache.cs
- MenuItem.cs
- ContentPresenter.cs
- PeerEndPoint.cs
- Point4DConverter.cs
- LogicalExpr.cs
- InternalBufferManager.cs
- SecurityPolicyVersion.cs
- Propagator.cs
- EnumerableRowCollection.cs
- ControllableStoryboardAction.cs
- _CacheStreams.cs
- RunWorkerCompletedEventArgs.cs
- Empty.cs
- ImageClickEventArgs.cs
- SqlGenericUtil.cs
- ClientRoleProvider.cs
- SqlUserDefinedTypeAttribute.cs
- ConnectionStringSettingsCollection.cs
- Screen.cs
- EmissiveMaterial.cs
- SslStream.cs
- TypeSystem.cs
- SystemColorTracker.cs
- ThicknessKeyFrameCollection.cs
- UnmanagedMarshal.cs
- Query.cs
- SafeNativeMethodsCLR.cs
- OleDbError.cs
- ClientBuildManagerCallback.cs
- GacUtil.cs
- ConnectionPointGlyph.cs
- SqlRemoveConstantOrderBy.cs
- TrimSurroundingWhitespaceAttribute.cs
- XPathPatternParser.cs
- HotSpotCollection.cs
- CornerRadius.cs
- StatusBarDrawItemEvent.cs
- CqlGenerator.cs
- PixelFormat.cs
- DBCSCodePageEncoding.cs
- PageThemeBuildProvider.cs