SetNotificationForWaitCompletion Method

Applies to: yesVisual Studio noVisual Studio for Mac

Note

This article applies to Visual Studio 2017. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

Sets or clears the TASK_STATE_WAIT_COMPLETION_NOTIFICATION state bit.

Namespace: System.Threading.Tasks

Assembly: mscorlib (in mscorlib.dll)

Syntax

internal void SetNotificationForWaitCompletion(bool enabled)

Parameters

enabled

true to set the bit; false to unset the bit.

Exceptions

Remarks

The debugger sets this bit to help step out of an async method body. If enabled is true, this method must be called only on a task that has not yet been completed. When enabled is false, this method can be called on completed tasks. In either event, it should only be used for promise-style tasks.

Requirements

See also