MeVisLabToolboxReference
|
A handle to a task that has been created by the background task manager. More...
#include <mlBackgroundTaskHandle.h>
Public Member Functions | |
BackgroundTaskHandle () | |
void | clear () |
clears the handle, make sure to call this from the taskFinishedCB of the background task manager | |
bool | hasTask () |
check if the handle has a task | |
bool | hasRunningTask () |
check if the handle has a task which is not canceled | |
bool | isCanceled () |
check if the task was canceled | |
void | cancel () |
cancel the running task | |
void | setOwnerWasDeleted () |
tell the task that the owner was deleted | |
Protected Member Functions | |
BackgroundTaskHandle (BackgroundTask *task) | |
Protected Attributes | |
BackgroundTask * | _task |
Friends | |
class | BackgroundTaskManager |
class | BackgroundTaskHandleAccessor |
A handle to a task that has been created by the background task manager.
This handle allows limited access to a running task, to avoid that users call methods that are not desired to be called during the task is processed in a worker thread.
Definition at line 30 of file mlBackgroundTaskHandle.h.
ml::BackgroundTaskHandle::BackgroundTaskHandle | ( | ) | [inline] |
Definition at line 33 of file mlBackgroundTaskHandle.h.
ml::BackgroundTaskHandle::BackgroundTaskHandle | ( | BackgroundTask * | task | ) | [inline, protected] |
Definition at line 56 of file mlBackgroundTaskHandle.h.
void ml::BackgroundTaskHandle::cancel | ( | ) |
cancel the running task
void ml::BackgroundTaskHandle::clear | ( | ) |
clears the handle, make sure to call this from the taskFinishedCB of the background task manager
bool ml::BackgroundTaskHandle::hasRunningTask | ( | ) |
check if the handle has a task which is not canceled
bool ml::BackgroundTaskHandle::hasTask | ( | ) |
check if the handle has a task
bool ml::BackgroundTaskHandle::isCanceled | ( | ) |
check if the task was canceled
void ml::BackgroundTaskHandle::setOwnerWasDeleted | ( | ) |
tell the task that the owner was deleted
friend class BackgroundTaskHandleAccessor [friend] |
Definition at line 55 of file mlBackgroundTaskHandle.h.
friend class BackgroundTaskManager [friend] |
Definition at line 54 of file mlBackgroundTaskHandle.h.
BackgroundTask* ml::BackgroundTaskHandle::_task [protected] |
Definition at line 58 of file mlBackgroundTaskHandle.h.