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
- SplitterCancelEvent.cs
- FontStyle.cs
- CodePageUtils.cs
- LeaseManager.cs
- DrawingContextDrawingContextWalker.cs
- SafeNativeMethods.cs
- TextServicesPropertyRanges.cs
- BinaryReader.cs
- ObjectStateEntryOriginalDbUpdatableDataRecord.cs
- PackageRelationshipCollection.cs
- ObjectListCommandEventArgs.cs
- DataContract.cs
- Rotation3DAnimationUsingKeyFrames.cs
- IxmlLineInfo.cs
- InternalCompensate.cs
- XPathAncestorIterator.cs
- DataGridViewComboBoxEditingControl.cs
- Error.cs
- FrameworkElementFactory.cs
- SessionSwitchEventArgs.cs
- MetafileHeader.cs
- MessageQueueEnumerator.cs
- SqlCharStream.cs
- TextRunTypographyProperties.cs
- wgx_commands.cs
- HtmlUtf8RawTextWriter.cs
- HtmlInputImage.cs
- SelectionListDesigner.cs
- NativeObjectSecurity.cs
- GeometryCombineModeValidation.cs
- LambdaCompiler.Lambda.cs
- UnmanagedBitmapWrapper.cs
- NeutralResourcesLanguageAttribute.cs
- Geometry3D.cs
- Html32TextWriter.cs
- BrushMappingModeValidation.cs
- StrokeNodeOperations.cs
- OleDbDataReader.cs
- EntityDataSourceValidationException.cs
- EFColumnProvider.cs
- DatePickerDateValidationErrorEventArgs.cs
- PrefixHandle.cs
- HwndMouseInputProvider.cs
- SoapAttributes.cs
- recordstate.cs
- TimeZoneNotFoundException.cs
- LabelLiteral.cs
- ContractUtils.cs
- TextDecorations.cs
- SimpleRecyclingCache.cs
- TypeRestriction.cs
- ListViewUpdatedEventArgs.cs
- HandoffBehavior.cs
- MD5CryptoServiceProvider.cs
- PrimitiveXmlSerializers.cs
- httpstaticobjectscollection.cs
- ParameterModifier.cs
- HighlightComponent.cs
- TdsParserHelperClasses.cs
- ObjectMaterializedEventArgs.cs
- _BufferOffsetSize.cs
- OdbcRowUpdatingEvent.cs
- TextAutomationPeer.cs
- InputElement.cs
- SafeNativeMethods.cs
- ValueExpressions.cs
- Font.cs
- SoapIncludeAttribute.cs
- HttpProfileBase.cs
- TextDecorationCollection.cs
- XmlCharType.cs
- SafeWaitHandle.cs
- InputBuffer.cs
- XmlSchemaAttribute.cs
- WsatTransactionInfo.cs
- SourceLocationProvider.cs
- RSAOAEPKeyExchangeDeformatter.cs
- MappingMetadataHelper.cs
- SQLString.cs
- ProcessInfo.cs
- OutKeywords.cs
- HandlerFactoryWrapper.cs
- Line.cs
- dsa.cs
- UIElement3D.cs
- RecognizedWordUnit.cs
- Directory.cs
- PeerCollaborationPermission.cs
- Animatable.cs
- ModelMemberCollection.cs
- PrtTicket_Public_Simple.cs
- WindowsToolbarItemAsMenuItem.cs
- XMLUtil.cs
- LedgerEntry.cs
- GuidelineSet.cs
- DictionaryContent.cs
- FixedSOMSemanticBox.cs
- KeyboardNavigation.cs
- CompositeDesignerAccessibleObject.cs
- AsmxEndpointPickerExtension.cs