Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Core / System / Linq / Parallel / Partitioning / OrderedHashRepartitionStream.cs / 1305376 / OrderedHashRepartitionStream.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== // =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ // // OrderedHashRepartitionStream.cs // //[....] // // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- using System.Collections.Generic; using System.Threading; namespace System.Linq.Parallel { internal class OrderedHashRepartitionStream: HashRepartitionStream { internal OrderedHashRepartitionStream( PartitionedStream inputStream, Func hashKeySelector, IEqualityComparer hashKeyComparer, IEqualityComparer elementComparer, CancellationToken cancellationToken) : base(inputStream.PartitionCount, inputStream.KeyComparer, hashKeyComparer, elementComparer) { m_partitions = new OrderedHashRepartitionEnumerator [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]; ListChunk [,] keyExchangeMatrix = new ListChunk [inputStream.PartitionCount, inputStream.PartitionCount]; // Now construct each partition object. for (int i = 0; i < inputStream.PartitionCount; i++) { m_partitions[i] = new OrderedHashRepartitionEnumerator ( inputStream[i], inputStream.PartitionCount, i, hashKeySelector, this, barrier, valueExchangeMatrix, keyExchangeMatrix, 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
- LingerOption.cs
- RepeaterItemCollection.cs
- ContentOperations.cs
- BitmapFrameDecode.cs
- TextSegment.cs
- BindingCompleteEventArgs.cs
- IncrementalHitTester.cs
- FigureHelper.cs
- RootBuilder.cs
- CustomMenuItemCollection.cs
- ConfigurationProperty.cs
- ValidationEventArgs.cs
- ChildTable.cs
- SerializationException.cs
- UnSafeCharBuffer.cs
- ComEventsHelper.cs
- CustomAssemblyResolver.cs
- XmlCodeExporter.cs
- BookmarkUndoUnit.cs
- SecurityTokenRequirement.cs
- AssemblyCache.cs
- WorkflowIdleElement.cs
- ConnectionManagementSection.cs
- ExtensionQuery.cs
- ParsedAttributeCollection.cs
- HttpFileCollection.cs
- Script.cs
- XmlSchemaInferenceException.cs
- DataIdProcessor.cs
- CorrelationResolver.cs
- XPathScanner.cs
- RequestDescription.cs
- XslNumber.cs
- TypedTableHandler.cs
- ObjectDataSourceSelectingEventArgs.cs
- QueryRelOp.cs
- ComponentResourceKeyConverter.cs
- TdsRecordBufferSetter.cs
- _AutoWebProxyScriptEngine.cs
- ObjectCloneHelper.cs
- complextypematerializer.cs
- RegexCode.cs
- WpfSharedXamlSchemaContext.cs
- ClockGroup.cs
- TextDocumentView.cs
- OleDbError.cs
- BitSet.cs
- IntSecurity.cs
- FixedTextBuilder.cs
- TextSelectionProcessor.cs
- MimeAnyImporter.cs
- WebBrowser.cs
- OutgoingWebRequestContext.cs
- PeerNearMe.cs
- FixedTextView.cs
- SQLCharsStorage.cs
- DetailsViewActionList.cs
- VideoDrawing.cs
- UserInitiatedNavigationPermission.cs
- ComponentChangedEvent.cs
- UserControlCodeDomTreeGenerator.cs
- ChameleonKey.cs
- KerberosTicketHashIdentifierClause.cs
- Int32Converter.cs
- DataServiceQueryException.cs
- GlobalizationAssembly.cs
- SelectionChangedEventArgs.cs
- CallbackException.cs
- UInt64.cs
- LogReservationCollection.cs
- RegistryKey.cs
- TabControl.cs
- RightNameExpirationInfoPair.cs
- Events.cs
- TdsParser.cs
- XPathMultyIterator.cs
- StreamUpgradeAcceptor.cs
- CSharpCodeProvider.cs
- LocationUpdates.cs
- AssemblyInfo.cs
- SslStream.cs
- SectionUpdates.cs
- TableCellCollection.cs
- Funcletizer.cs
- UnsafeNativeMethods.cs
- UnicodeEncoding.cs
- InputReferenceExpression.cs
- MonikerUtility.cs
- SecurityTokenProvider.cs
- ContainerControlDesigner.cs
- QilUnary.cs
- MetadataUtil.cs
- PathGeometry.cs
- TypeBuilder.cs
- TreeNodeCollectionEditor.cs
- DesignerSerializationManager.cs
- Base64Stream.cs
- SmtpTransport.cs
- CodeMemberMethod.cs
- PanelStyle.cs