AsyncAutoResetEvent Constructor (Boolean)
Instantiates a new instance of AsyncAutoResetEvent that specifies whether or not awaiters should be completed synchronously or asynchronously.
Namespace: Microsoft.VisualStudio.Threading
Assembly: Microsoft.VisualStudio.Threading (in Microsoft.VisualStudio.Threading.dll)
Syntax
'Declaration
Public Sub New ( _
allowInliningAwaiters As Boolean _
)
public AsyncAutoResetEvent(
bool allowInliningAwaiters
)
public:
AsyncAutoResetEvent(
bool allowInliningAwaiters
)
new :
allowInliningAwaiters:bool -> AsyncAutoResetEvent
public function AsyncAutoResetEvent(
allowInliningAwaiters : boolean
)
Parameters
allowInliningAwaiters
Type: System.Booleantrue if awaiters may execute synchronously when SetAsync is called before the call returns. false if SetAsync returns immediately and all continuations execute independently.
Remarks
Setting the allowInliningWaiters parameter to false simulates the behavior of the AutoResetEvent class, but setting it to true can result in slightly better performance.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.