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
- ObjectQueryExecutionPlan.cs
- DataGridViewCellStateChangedEventArgs.cs
- KerberosReceiverSecurityToken.cs
- Crypto.cs
- MethodBuilderInstantiation.cs
- CqlParserHelpers.cs
- WebPartsSection.cs
- ReadOnlyCollection.cs
- IntSecurity.cs
- XmlDownloadManager.cs
- UrlAuthorizationModule.cs
- Encoder.cs
- XmlCharacterData.cs
- SqlInfoMessageEvent.cs
- HttpHandlersSection.cs
- EdgeModeValidation.cs
- AlternationConverter.cs
- XsdBuilder.cs
- Light.cs
- WebPartDescriptionCollection.cs
- RegionData.cs
- Style.cs
- MouseGestureValueSerializer.cs
- CacheOutputQuery.cs
- RouteValueExpressionBuilder.cs
- QueryResponse.cs
- CodeArrayCreateExpression.cs
- UIElementParagraph.cs
- PerformanceCounterScope.cs
- SharedPersonalizationStateInfo.cs
- FixedPageProcessor.cs
- FeatureSupport.cs
- CompModSwitches.cs
- DiscoveryDocumentLinksPattern.cs
- FrameworkElementFactory.cs
- AlternateViewCollection.cs
- StructureChangedEventArgs.cs
- HtmlProps.cs
- FileDialogPermission.cs
- ColumnReorderedEventArgs.cs
- RootBrowserWindow.cs
- TypeDescriptor.cs
- WebFormDesignerActionService.cs
- BindingWorker.cs
- Visual3DCollection.cs
- ConfigurationManagerHelper.cs
- SiteMapNodeItemEventArgs.cs
- Ipv6Element.cs
- ExtensionQuery.cs
- CollectionViewGroup.cs
- EtwTrace.cs
- SapiRecoInterop.cs
- GeneratedView.cs
- PropertyBuilder.cs
- TypeListConverter.cs
- CodeBinaryOperatorExpression.cs
- OleDbEnumerator.cs
- ListViewVirtualItemsSelectionRangeChangedEvent.cs
- WebConfigurationHostFileChange.cs
- DataMemberFieldEditor.cs
- CalloutQueueItem.cs
- XamlPointCollectionSerializer.cs
- EditCommandColumn.cs
- ConfigurationValidatorAttribute.cs
- ProviderCollection.cs
- Section.cs
- DataGridViewCheckBoxCell.cs
- BindableTemplateBuilder.cs
- SqlUdtInfo.cs
- EqualityArray.cs
- EntityCollection.cs
- IndexedEnumerable.cs
- Run.cs
- tooltip.cs
- UnsafeNativeMethods.cs
- MethodBuilderInstantiation.cs
- PropertyExpression.cs
- UrlAuthFailedErrorFormatter.cs
- RtfToXamlReader.cs
- DescendantBaseQuery.cs
- DataSvcMapFileSerializer.cs
- UserControlBuildProvider.cs
- DecimalFormatter.cs
- ModuleConfigurationInfo.cs
- EraserBehavior.cs
- Keywords.cs
- WsatServiceCertificate.cs
- SubpageParagraph.cs
- JsonReaderDelegator.cs
- WebBrowserProgressChangedEventHandler.cs
- BaseDataList.cs
- HtmlInputControl.cs
- COM2DataTypeToManagedDataTypeConverter.cs
- PackagePart.cs
- UncommonField.cs
- _LazyAsyncResult.cs
- ThreadExceptionDialog.cs
- InputMethodStateChangeEventArgs.cs
- WindowsFont.cs
- ActivityExecutionContextCollection.cs