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
- AliasExpr.cs
- OutKeywords.cs
- Grid.cs
- Parsers.cs
- XmlLanguage.cs
- EncoderReplacementFallback.cs
- BigInt.cs
- XmlTextAttribute.cs
- FrameworkElementAutomationPeer.cs
- SingleAnimation.cs
- NamedPipeChannelListener.cs
- ExpandableObjectConverter.cs
- EventLogEntry.cs
- DataKeyArray.cs
- XmlProcessingInstruction.cs
- EditCommandColumn.cs
- GroupItem.cs
- ToolStripItem.cs
- QuotedPrintableStream.cs
- Win32Exception.cs
- Effect.cs
- PbrsForward.cs
- BulletDecorator.cs
- WmlMobileTextWriter.cs
- TemplatePagerField.cs
- DependentList.cs
- InputEventArgs.cs
- OLEDB_Util.cs
- GenericXmlSecurityToken.cs
- AnnotationHelper.cs
- EmptyEnumerator.cs
- ReceiveActivityDesigner.cs
- KeyedCollection.cs
- GridItemCollection.cs
- TemplateInstanceAttribute.cs
- ContentFilePart.cs
- DataControlLinkButton.cs
- DetailsViewUpdatedEventArgs.cs
- LeftCellWrapper.cs
- Attributes.cs
- ILGen.cs
- MatrixCamera.cs
- GridProviderWrapper.cs
- NavigatorInput.cs
- NativeMethods.cs
- ToolStripItemTextRenderEventArgs.cs
- ConfigurationSettings.cs
- MenuAutomationPeer.cs
- GenericEnumConverter.cs
- CrossSiteScriptingValidation.cs
- SecurityContext.cs
- MsmqIntegrationProcessProtocolHandler.cs
- Parameter.cs
- FigureHelper.cs
- TypeUtil.cs
- OleDbWrapper.cs
- WorkflowViewElement.cs
- SafeSystemMetrics.cs
- MDIWindowDialog.cs
- CipherData.cs
- CodeParameterDeclarationExpressionCollection.cs
- CurrentChangedEventManager.cs
- XmlWrappingWriter.cs
- HttpStreamMessage.cs
- ImageSource.cs
- XmlTextAttribute.cs
- panel.cs
- DoubleCollectionConverter.cs
- Rss20ItemFormatter.cs
- CalculatedColumn.cs
- EntityDataSourceStatementEditor.cs
- WebAdminConfigurationHelper.cs
- MetadataProperty.cs
- TokenFactoryCredential.cs
- PlaceHolder.cs
- ListViewAutomationPeer.cs
- WebResourceUtil.cs
- Source.cs
- ToolStripItem.cs
- InternalConfigConfigurationFactory.cs
- JobPageOrder.cs
- PropertyItemInternal.cs
- InvalidAsynchronousStateException.cs
- XmlSchemaAnyAttribute.cs
- IncrementalReadDecoders.cs
- NameValuePair.cs
- TimerExtension.cs
- ServiceMetadataBehavior.cs
- CharKeyFrameCollection.cs
- GeneralTransformGroup.cs
- ExpressionBuilder.cs
- XsltException.cs
- Int16Storage.cs
- AcceleratedTokenProvider.cs
- DataServiceRequestOfT.cs
- LineVisual.cs
- SpellerError.cs
- MarkupCompilePass2.cs
- TextTrailingWordEllipsis.cs
- documentsequencetextcontainer.cs