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)

public:
AsyncAutoResetEvent(
	bool allowInliningAwaiters
)

Parameters

allowInliningAwaiters
Type: System::Boolean

true if awaiters may execute synchronously when SetAsync is called before the call returns. false if SetAsync returns immediately and all continuations execute independently.

Setting the allowInliningWaiters parameter to false simulates the behavior of the AutoResetEvent class, but setting it to true can result in slightly better performance.

Return to top
Show: