FAsyncTaskExecuterWithAbort

[FAsyncTaskExecuterWithAbort](API\Plugins\ModelingOperators\FAsyncTaskExecuterWithAbort) is an extension of [FAsyncTask](API\Runtime\Core\Async\FAsyncTask) that adds a bAbort flag.

Windows
MacOS
Linux

Warnings

  • keep in mind that the target TTask may not terminate immediately (hence all the machinery). It may continue to use resources/CPU for some time.

Inheritance Hierarchy

IQueuedWork

FAsyncTask

FAsyncTaskExecuterWithAbort

References

Module

ModelingOperators

Header

/Engine/Plugins/Experimental/MeshModelingToolset/Source/ModelingOperators/Public/ModelingTaskTypes.h

Include

#include "ModelingTaskTypes.h"

Syntax

template<typename TTask>
class FAsyncTaskExecuterWithAbort : public FAsyncTask< TTask >

Remarks

FAsyncTaskExecuterWithAbort is an extension of FAsyncTask that adds a bAbort flag. This flag is passed to the target TTask via a new function that it must implemented, SetAbortSource().

If the task-executing source wishes to cancel the contained task, then it calls CancelAndDelete(). This sets the abort flag to true, and spanws a TDeleterTask that will take ownership of the now-discarded background task, watch for it to be complete, and delete it, then delete itself.

So after calling CancelAndDelete() the task-executing source may discard any reference to the original FAsyncTask (but not delete it!)

keep in mind that the target TTask may not terminate immediately (hence all the machinery). It may continue to use resources/CPU for some time.

Variables

Name Description

Public variable

bool

 

bAbort

Set to true to abort the child task.

Constructors

Name Description

Public function

FAsyncTaskExecuterWithAbort

(
    Arg0Type&& Arg0,
    ArgTypes&&... Args
)

Functions

Name Description

Public function

void

 

CancelAndDelete()

Tells the child FAbandonableTask to terminate itself, via the bAbort flag passed in SetAbortSource, and then starts a TDeleterTask that waits for completion and

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss