Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

cancel_current_task Function

 

Cancels the currently executing task. This function can be called from within the body of a task to abort the task's execution and cause it to enter the canceled state.

It is not a supported scenario to call this function if you are not within the body of a task. Doing so will result in undefined behavior such as a crash or a hang in your application.

inline __declspec(
   noreturn
) void __cdecl cancel_current_task();

Requirements

Header: ppltasks.h

Namespace: concurrency

Show:
© 2016 Microsoft