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
- DoubleStorage.cs
- DropDownList.cs
- XmlSchemaSimpleType.cs
- AudioException.cs
- TreeViewItem.cs
- RenderingBiasValidation.cs
- SqlTypeConverter.cs
- SpellerError.cs
- ToolboxDataAttribute.cs
- PassportAuthenticationEventArgs.cs
- SecurityRuntime.cs
- TimelineGroup.cs
- InternalConfigSettingsFactory.cs
- BooleanFacetDescriptionElement.cs
- SystemPens.cs
- FixedSOMTableRow.cs
- ItemType.cs
- FileLevelControlBuilderAttribute.cs
- XmlMapping.cs
- KeyManager.cs
- WizardSideBarListControlItem.cs
- Rules.cs
- DispatchWrapper.cs
- Imaging.cs
- WebPartManagerDesigner.cs
- CustomAssemblyResolver.cs
- StringValueSerializer.cs
- ImageDrawing.cs
- XmlAnyAttributeAttribute.cs
- DelayedRegex.cs
- XPathAncestorIterator.cs
- HtmlHead.cs
- DiagnosticTrace.cs
- NetTcpSectionData.cs
- XPathScanner.cs
- SubqueryTrackingVisitor.cs
- Calendar.cs
- ClientTargetSection.cs
- DataException.cs
- DockPanel.cs
- FormViewDeletedEventArgs.cs
- ColorAnimation.cs
- DataGridViewTopLeftHeaderCell.cs
- UriExt.cs
- XmlUnspecifiedAttribute.cs
- LockCookie.cs
- TypeUsage.cs
- CodePrimitiveExpression.cs
- DbBuffer.cs
- XPathAncestorQuery.cs
- CompareValidator.cs
- RepeatButtonAutomationPeer.cs
- Grant.cs
- CustomAttributeFormatException.cs
- ExpressionReplacer.cs
- AbsoluteQuery.cs
- FragmentQuery.cs
- CollectionConverter.cs
- XPathBinder.cs
- WinFormsUtils.cs
- DataServiceContext.cs
- ShapeTypeface.cs
- WorkflowMarkupSerializationProvider.cs
- ModuleBuilder.cs
- ConfigDefinitionUpdates.cs
- PolicyException.cs
- XmlDataDocument.cs
- MultiBindingExpression.cs
- ConstraintCollection.cs
- ToolStripStatusLabel.cs
- TogglePattern.cs
- ProfileSettingsCollection.cs
- List.cs
- CodeArgumentReferenceExpression.cs
- Deserializer.cs
- ProgressBarBrushConverter.cs
- Connector.cs
- TypeTypeConverter.cs
- DESCryptoServiceProvider.cs
- ReadOnlyCollectionBase.cs
- MultiSelector.cs
- Rfc2898DeriveBytes.cs
- ExtenderControl.cs
- HtmlControlPersistable.cs
- WebPartConnectionsCancelEventArgs.cs
- UIntPtr.cs
- SchemaCollectionCompiler.cs
- FileDialogCustomPlacesCollection.cs
- ComponentCommands.cs
- DoubleConverter.cs
- Regex.cs
- ButtonBaseAutomationPeer.cs
- XmlAttribute.cs
- Type.cs
- LocalBuilder.cs
- SqlComparer.cs
- SchemaImporter.cs
- invalidudtexception.cs
- Column.cs
- ControlCollection.cs