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.
| IQueuedWork
|
Module |
|
Header |
/Engine/Plugins/Experimental/MeshModelingToolset/Source/ModelingOperators/Public/ModelingTaskTypes.h |
Include |
#include "ModelingTaskTypes.h" |
template<typename TTask>
class FAsyncTaskExecuterWithAbort : public FAsyncTask< TTask >
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.
Name | Description | |
---|---|---|
|
FAsyncTaskExecuterWithAbort ( |
Name | Description | ||
---|---|---|---|
|
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 |