13#ifndef ML_BACKGROUND_TASK_HANDLE_H
14#define ML_BACKGROUND_TASK_HANDLE_H
#define MLBACKGROUNDTASKS_EXPORT
Project global and OS specific declarations.
This class offers direct access to the contained background task.
static BackgroundTask * get(const BackgroundTaskHandle &handle)
A handle to a task that has been created by the background task manager.
bool isCanceled() const
check if the task was canceled
void clear()
clears the handle, make sure to call this from the taskFinishedCB of the background task manager
bool hasTask() const
check if the handle has a task
BackgroundTaskHandle(BackgroundTask *task)
void setOwnerWasDeleted()
tell the task that the owner was deleted
void cancel()
cancel the running task
bool hasRunningTask() const
check if the handle has a task which is not canceled
the BackgroundTaskManager is the central singleton that manages running background tasks
Base class for a task that is started in an extra thread.
Target mlrange_cast(Source arg)
Generic version of checked ML casts.