Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Core / System / Linq / Parallel / Scheduling / QueryLifecycle.cs / 1305376 / QueryLifecycle.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== // =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ // // QueryLifecycle.cs // //[....] // // A convenient place to put things associated with entire queries and their lifecycle events. // // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- using System.Diagnostics; using System.Threading; using System.Threading.Tasks; using System.Diagnostics.Contracts; namespace System.Linq.Parallel { internal static class QueryLifecycle { // This method is called once per execution of a logical query. // (It is not called multiple time if repartitionings occur) internal static void LogicalQueryExecutionBegin(int queryID) { //We call NOCTD to inform the debugger that multiple threads will most likely be required to //execute this query. We do not attempt to run the query even if we think we could, for simplicity and consistency. #if !PFX_LEGACY_3_5 Debugger.NotifyOfCrossThreadDependency(); #endif #if !FEATURE_PAL // PAL doesn't support eventing PlinqEtwProvider.Log.ParallelQueryBegin(queryID); #endif } // This method is called once per execution of a logical query. // (It is not called multiple time if repartitionings occur) internal static void LogicalQueryExecutionEnd(int queryID) { #if !FEATURE_PAL // PAL doesn't support eventing PlinqEtwProvider.Log.ParallelQueryEnd(queryID); #endif } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== // =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ // // QueryLifecycle.cs // //[....] // // A convenient place to put things associated with entire queries and their lifecycle events. // // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- using System.Diagnostics; using System.Threading; using System.Threading.Tasks; using System.Diagnostics.Contracts; namespace System.Linq.Parallel { internal static class QueryLifecycle { // This method is called once per execution of a logical query. // (It is not called multiple time if repartitionings occur) internal static void LogicalQueryExecutionBegin(int queryID) { //We call NOCTD to inform the debugger that multiple threads will most likely be required to //execute this query. We do not attempt to run the query even if we think we could, for simplicity and consistency. #if !PFX_LEGACY_3_5 Debugger.NotifyOfCrossThreadDependency(); #endif #if !FEATURE_PAL // PAL doesn't support eventing PlinqEtwProvider.Log.ParallelQueryBegin(queryID); #endif } // This method is called once per execution of a logical query. // (It is not called multiple time if repartitionings occur) internal static void LogicalQueryExecutionEnd(int queryID) { #if !FEATURE_PAL // PAL doesn't support eventing PlinqEtwProvider.Log.ParallelQueryEnd(queryID); #endif } } } // 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
- TrackingMemoryStreamFactory.cs
- AutoCompleteStringCollection.cs
- BoolExpr.cs
- HashSetDebugView.cs
- SequenceQuery.cs
- TemplateControlParser.cs
- OdbcParameterCollection.cs
- RoleGroup.cs
- BuildManagerHost.cs
- SettingsPropertyValue.cs
- ScanQueryOperator.cs
- EnumerableCollectionView.cs
- AutomationProperties.cs
- MenuScrollingVisibilityConverter.cs
- HostAdapter.cs
- VarRefManager.cs
- RuntimeArgumentHandle.cs
- DataConnectionHelper.cs
- UshortList2.cs
- FileRecordSequence.cs
- SqlGatherConsumedAliases.cs
- HtmlWindow.cs
- Win32.cs
- TableDetailsRow.cs
- ParagraphResult.cs
- Queue.cs
- XdrBuilder.cs
- HealthMonitoringSectionHelper.cs
- CurrencyWrapper.cs
- BoundField.cs
- ListViewGroupCollectionEditor.cs
- NavigationCommands.cs
- OSEnvironmentHelper.cs
- BrowserCapabilitiesFactoryBase.cs
- VSWCFServiceContractGenerator.cs
- IPAddress.cs
- Grid.cs
- WebResponse.cs
- coordinator.cs
- ExtentCqlBlock.cs
- InternalEnumValidatorAttribute.cs
- ListSourceHelper.cs
- PartialList.cs
- EntityCommandDefinition.cs
- PropertyGrid.cs
- TextRangeEdit.cs
- UpdateProgress.cs
- ValidationSummary.cs
- Focus.cs
- LicenseProviderAttribute.cs
- DbgCompiler.cs
- XmlProcessingInstruction.cs
- DataGridViewCellLinkedList.cs
- ContainerUIElement3D.cs
- VarRefManager.cs
- ProbeMatches11.cs
- WebGetAttribute.cs
- LoginCancelEventArgs.cs
- TextEndOfSegment.cs
- SelectionUIService.cs
- NavigatingCancelEventArgs.cs
- DataRecordObjectView.cs
- SafeCoTaskMem.cs
- CollectionBuilder.cs
- Atom10FormatterFactory.cs
- PerformanceCounterLib.cs
- GenericAuthenticationEventArgs.cs
- WebPartUtil.cs
- TimelineGroup.cs
- WindowsSolidBrush.cs
- ServicePointManager.cs
- login.cs
- MergeLocalizationDirectives.cs
- _NegoState.cs
- InfoCardAsymmetricCrypto.cs
- XmlSchemaSimpleContentExtension.cs
- SchemaImporterExtensionElement.cs
- SqlFormatter.cs
- MaterialCollection.cs
- ComplexPropertyEntry.cs
- CallbackValidator.cs
- WebConfigurationHost.cs
- OleAutBinder.cs
- Model3D.cs
- PersistenceTypeAttribute.cs
- DelegateSerializationHolder.cs
- ReflectionTypeLoadException.cs
- ReadOnlyTernaryTree.cs
- TargetParameterCountException.cs
- StopStoryboard.cs
- LocalBuilder.cs
- ExtendedProperty.cs
- DefaultEventAttribute.cs
- PtsHost.cs
- SetMemberBinder.cs
- SettingsProperty.cs
- ProcessModelInfo.cs
- EntitySetBase.cs
- CultureData.cs
- Condition.cs