AsyncFlowControl Structure

Note: This structure is new in the .NET Framework version 2.0.

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
JScript suports the use of structures, but not the declaration of new ones.

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.

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 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 .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0

Community Additions