Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Core / System / Linq / Parallel / QueryOperators / PartitionedStreamMerger.cs / 1305376 / PartitionedStreamMerger.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== // =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ // // PartitionedStreamMerger.cs // //[....] // // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- using System.Threading.Tasks; using System.Diagnostics.Contracts; namespace System.Linq.Parallel { ////// Partitioned stream recipient that will merge the results. /// internal class PartitionedStreamMerger: IPartitionedStreamRecipient { private bool m_forEffectMerge; private ParallelMergeOptions m_mergeOptions; private bool m_isOrdered; private MergeExecutor m_mergeExecutor = null; private TaskScheduler m_taskScheduler; private int m_queryId; // ID of the current query execution private CancellationState m_cancellationState; #if DEBUG private bool m_received = false; #endif // Returns the merge executor which merges the received partitioned stream. internal MergeExecutor MergeExecutor { get { #if DEBUG Contract.Assert(m_received, "Cannot return the merge executor because Receive() has not been called yet."); #endif return m_mergeExecutor; } } internal PartitionedStreamMerger(bool forEffectMerge, ParallelMergeOptions mergeOptions, TaskScheduler taskScheduler, bool outputOrdered, CancellationState cancellationState, int queryId) { m_forEffectMerge = forEffectMerge; m_mergeOptions = mergeOptions; m_isOrdered = outputOrdered; m_taskScheduler = taskScheduler; m_cancellationState = cancellationState; m_queryId = queryId; } public void Receive (PartitionedStream partitionedStream) { #if DEBUG m_received = true; #endif m_mergeExecutor = MergeExecutor .Execute ( partitionedStream, m_forEffectMerge, m_mergeOptions, m_taskScheduler, m_isOrdered, m_cancellationState, m_queryId); TraceHelpers.TraceInfo("[timing]: {0}: finished opening - QueryOperator<>::GetEnumerator", DateTime.Now.Ticks); } } } // 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
- NamespaceList.cs
- SiteMapProvider.cs
- CustomUserNameSecurityTokenAuthenticator.cs
- FlowDocumentScrollViewer.cs
- AddressHeaderCollection.cs
- BuildProviderUtils.cs
- BrowsableAttribute.cs
- UiaCoreTypesApi.cs
- ArcSegment.cs
- IdentityManager.cs
- ViewCellSlot.cs
- PointLightBase.cs
- X509Utils.cs
- QueryStringConverter.cs
- RawKeyboardInputReport.cs
- WebResourceAttribute.cs
- SimpleRecyclingCache.cs
- SetIterators.cs
- UidPropertyAttribute.cs
- InternalConfigHost.cs
- PropertySet.cs
- BinaryWriter.cs
- XmlArrayItemAttribute.cs
- ManipulationLogic.cs
- QueryCreatedEventArgs.cs
- CharConverter.cs
- ConstraintCollection.cs
- SamlAdvice.cs
- XPathMultyIterator.cs
- AttachInfo.cs
- HtmlTable.cs
- FontCacheLogic.cs
- TakeQueryOptionExpression.cs
- ConfigurationManagerHelperFactory.cs
- AnnotationResourceCollection.cs
- ToolStripPanelSelectionBehavior.cs
- ResizeGrip.cs
- MasterPage.cs
- ProcessModelSection.cs
- Condition.cs
- StaticContext.cs
- PenThread.cs
- HandlerFactoryCache.cs
- DoubleLink.cs
- SessionPageStatePersister.cs
- IncrementalHitTester.cs
- RegisteredHiddenField.cs
- BypassElementCollection.cs
- assertwrapper.cs
- EntitySqlQueryCacheEntry.cs
- ArraySortHelper.cs
- LinkLabel.cs
- ProjectedWrapper.cs
- X509Extension.cs
- ErrorProvider.cs
- DoubleUtil.cs
- KeyValuePairs.cs
- tibetanshape.cs
- HttpWrapper.cs
- ToolStripHighContrastRenderer.cs
- SqlProvider.cs
- ZoneIdentityPermission.cs
- NotifyParentPropertyAttribute.cs
- FramingEncoders.cs
- SystemIPAddressInformation.cs
- TreeIterators.cs
- BamlTreeMap.cs
- UnconditionalPolicy.cs
- SkewTransform.cs
- WindowsEditBox.cs
- DateTimeConverter.cs
- EntitySetBase.cs
- DSACryptoServiceProvider.cs
- UdpTransportBindingElement.cs
- CookieProtection.cs
- OracleRowUpdatingEventArgs.cs
- NamedPipeTransportElement.cs
- SoapSchemaMember.cs
- PeerEndPoint.cs
- NotificationContext.cs
- DynamicMethod.cs
- DataControlImageButton.cs
- ErrorFormatterPage.cs
- WindowsFont.cs
- State.cs
- OdbcUtils.cs
- CollectionViewGroup.cs
- _SpnDictionary.cs
- WebPartUserCapability.cs
- PageBuildProvider.cs
- DataObject.cs
- InstanceData.cs
- XhtmlBasicImageAdapter.cs
- COM2TypeInfoProcessor.cs
- SimpleTextLine.cs
- TypeToken.cs
- ListDictionary.cs
- ScrollBar.cs
- Formatter.cs
- DecoderFallback.cs