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.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.

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

See Also

Reference

AsyncAutoResetEvent Class

AsyncAutoResetEvent Overload

Microsoft.VisualStudio.Threading Namespace