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
- GridViewUpdatedEventArgs.cs
- LOSFormatter.cs
- WindowsListViewGroupHelper.cs
- EdmFunctions.cs
- CompileLiteralTextParser.cs
- QueryCorrelationInitializer.cs
- WindowsRebar.cs
- SqlDataSourceStatusEventArgs.cs
- GenericWebPart.cs
- DebugView.cs
- XmlBinaryWriter.cs
- HttpDictionary.cs
- StreamAsIStream.cs
- AdornerDecorator.cs
- DataBoundControlAdapter.cs
- GeneralTransform3DTo2D.cs
- GatewayDefinition.cs
- sqlstateclientmanager.cs
- ClockGroup.cs
- CopyNamespacesAction.cs
- SponsorHelper.cs
- PermissionSet.cs
- ComponentSerializationService.cs
- path.cs
- XmlHierarchicalDataSourceView.cs
- TrackingMemoryStream.cs
- CodeCompiler.cs
- XmlSchemaAnyAttribute.cs
- OperandQuery.cs
- EntityDataSourceValidationException.cs
- Command.cs
- MessagePropertyAttribute.cs
- BasicBrowserDialog.cs
- Axis.cs
- WindowsSidIdentity.cs
- PolyQuadraticBezierSegmentFigureLogic.cs
- UrlRoutingHandler.cs
- Annotation.cs
- ListViewItemEventArgs.cs
- SimpleTypeResolver.cs
- XmlSignatureProperties.cs
- DataBindingHandlerAttribute.cs
- DeviceSpecificDialogCachedState.cs
- RenamedEventArgs.cs
- StrokeCollectionDefaultValueFactory.cs
- DashStyle.cs
- KeySplineConverter.cs
- CaseInsensitiveComparer.cs
- SiteIdentityPermission.cs
- XDRSchema.cs
- CodeExpressionCollection.cs
- XmlAttributeAttribute.cs
- EdmFunctions.cs
- TimeSpanValidatorAttribute.cs
- Rfc2898DeriveBytes.cs
- InvokeDelegate.cs
- StrongNameIdentityPermission.cs
- DataTemplateSelector.cs
- SqlUDTStorage.cs
- CategoryGridEntry.cs
- XPathSingletonIterator.cs
- HttpConfigurationSystem.cs
- GlyphRun.cs
- RequestCacheEntry.cs
- ExceptionHandler.cs
- PeerTransportListenAddressValidator.cs
- ProfileModule.cs
- ListItem.cs
- InheritanceContextHelper.cs
- Pts.cs
- DynamicPropertyHolder.cs
- TimeSpanSecondsOrInfiniteConverter.cs
- Point4DValueSerializer.cs
- EmptyStringExpandableObjectConverter.cs
- HtmlInputButton.cs
- StateBag.cs
- QilParameter.cs
- TextRunCache.cs
- MsmqInputChannelListener.cs
- RootBrowserWindowAutomationPeer.cs
- mda.cs
- TreeWalker.cs
- SettingsPropertyIsReadOnlyException.cs
- SynchronizationContext.cs
- StubHelpers.cs
- ReceiveCompletedEventArgs.cs
- SpeakCompletedEventArgs.cs
- Item.cs
- XMLDiffLoader.cs
- DataGrid.cs
- Int64.cs
- StreamAsIStream.cs
- MenuBase.cs
- DebugInfoExpression.cs
- ConfigXmlText.cs
- ObjectManager.cs
- ReadOnlyDataSource.cs
- ProxyWebPartManager.cs
- SubpageParagraph.cs
- ElementUtil.cs