Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / WF / RunTime / ExecutorLocksHeldException.cs / 1305376 / ExecutorLocksHeldException.cs
// **************************************************************************** // Copyright (C) 2000-2001 Microsoft Corporation. All rights reserved. // // CONTENTS // Workflow Base exception class // // DESCRIPTION // Base class for WINOE Runtime engine exception // // REVISIONS // Date Ver By Remarks // ~~~~~~~~~~ ~~~ ~~~~~~~~ ~~~~~~~~~~~~~~ // 03/08/01 1.0 [....] Created. // *************************************************************************** using System; using System.Runtime.Serialization; using System.Security.Permissions; using System.Collections.Generic; using System.Globalization; using System.Threading; using System.Workflow; using System.Workflow.Runtime; using System.Workflow.ComponentModel; namespace System.Workflow.Runtime { /* * The Unload() method has been changed so that * any Unload requests made while in the middle of an atomic * transaction wait for the atomic transaction to complete. * This makes use of an ManualResetEvent. Unload() waits on the event: * theEvent.WaitOne() * But waiting with the executor and scheduler locks held * will block everything else. * * The solution is to have a custom internal exception class that has the * ManualResetEvent as an internal property. If Unload() finds itself in the middle * of an atomic transaction, it throws the Exception. The Exception is propogated upwards * until we reach the method that was the first to grab the executor lock. * * We then drop that lock and wait on the event handle. As soon as the handle is * Set() by DisposeTransaction(), we grab the executor lock and do everything all over. */ internal class ExecutorLocksHeldException : Exception { private ManualResetEvent handle; public ExecutorLocksHeldException(ManualResetEvent handle) { this.handle = handle; } internal ManualResetEvent Handle { get { return handle; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- CatalogPart.cs
- TextServicesPropertyRanges.cs
- WSHttpSecurityElement.cs
- FileCodeGroup.cs
- EventLogTraceListener.cs
- TypeValidationEventArgs.cs
- TagMapInfo.cs
- DataServiceRequestOfT.cs
- PhysicalFontFamily.cs
- RbTree.cs
- StagingAreaInputItem.cs
- SourceFileBuildProvider.cs
- RsaEndpointIdentity.cs
- IsolatedStorageFileStream.cs
- ProfilePropertySettings.cs
- Line.cs
- MailHeaderInfo.cs
- SequentialOutput.cs
- GeneralTransform.cs
- InputBinding.cs
- SparseMemoryStream.cs
- ProtocolsSection.cs
- latinshape.cs
- DynamicResourceExtension.cs
- SqlRetyper.cs
- EntityModelBuildProvider.cs
- BinaryMethodMessage.cs
- ResetableIterator.cs
- UnsafeCollabNativeMethods.cs
- Command.cs
- EdmRelationshipRoleAttribute.cs
- SqlHelper.cs
- DbDataSourceEnumerator.cs
- XPathDocumentNavigator.cs
- ClientRolePrincipal.cs
- TemplateKey.cs
- WSSecurityPolicy11.cs
- UpdatePanelTrigger.cs
- LogicalExpressionEditor.cs
- formatter.cs
- SimpleHandlerFactory.cs
- DockPanel.cs
- HideDisabledControlAdapter.cs
- AxImporter.cs
- SQLCharsStorage.cs
- WorkflowRequestContext.cs
- Update.cs
- QueryCacheEntry.cs
- NavigationProperty.cs
- TextDecorationUnitValidation.cs
- TypeNameConverter.cs
- UnorderedHashRepartitionStream.cs
- BitmapMetadataBlob.cs
- TextSpan.cs
- List.cs
- TextServicesManager.cs
- DbParameterCollectionHelper.cs
- ProgressiveCrcCalculatingStream.cs
- Shape.cs
- XmlNodeReader.cs
- RenderOptions.cs
- BamlLocalizerErrorNotifyEventArgs.cs
- ArgumentElement.cs
- OptimalBreakSession.cs
- ConfigurationLockCollection.cs
- UpdateTracker.cs
- PagedDataSource.cs
- MailWriter.cs
- DataGridViewLinkCell.cs
- PerfCounters.cs
- ExtendedPropertyCollection.cs
- CodeChecksumPragma.cs
- ThreadSafeList.cs
- Directory.cs
- LoginView.cs
- SevenBitStream.cs
- BinaryObjectInfo.cs
- ErrorFormatterPage.cs
- ConfigXmlWhitespace.cs
- EventManager.cs
- WebHttpEndpointElement.cs
- WindowsAuthenticationModule.cs
- EntityParameter.cs
- AssemblyName.cs
- FormatSettings.cs
- BindingMAnagerBase.cs
- XPathSingletonIterator.cs
- ResolveNameEventArgs.cs
- CqlParserHelpers.cs
- TextRunCache.cs
- StyleBamlTreeBuilder.cs
- Stack.cs
- TableSectionStyle.cs
- SiblingIterators.cs
- HMACRIPEMD160.cs
- OuterGlowBitmapEffect.cs
- DbConnectionStringCommon.cs
- WindowsListViewScroll.cs
- sqlnorm.cs
- HandlerWithFactory.cs