Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

AsyncFlowControl Structure

Provides the functionality to restore the migration, or flow, of the execution context between threads.

Namespace: System.Threading
Assembly: mscorlib (in mscorlib.dll)

public struct AsyncFlowControl : IDisposable
public final class AsyncFlowControl extends ValueType implements IDisposable
Not applicable.

An execution context contains all execution-related information for a logical thread. The flow of the execution context to other threads can be prevented by using the ExecutionContext.SuppressFlow method, which returns an AsyncFlowControl structure. The Undo method of the returned AsyncFlowControl structure can be used to undo the flow suppression. The AsyncFlowControl structure must be used on the same thread on which it was created.

The following code example shows the use of the AsyncFlowControl class. This code example is part of a larger example provided for the ExecutionContext class.

Console.WriteLine("Suppress the flow of the execution context.");
AsyncFlowControl aFC = ExecutionContext.SuppressFlow();

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

ADD
Show:
© 2015 Microsoft