| 
    MeVisLab Toolbox Reference
    
   | 
 
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 () const | 
| Returns whether the handle has a task.   | |
| bool | hasRunningTask () const | 
| Returns whether the handle has a task that is not canceled.   | |
| bool | isCanceled () const | 
| Returns whether the task was canceled.   | |
| void | cancel () | 
| Cancels the running task.   | |
| void | setOwnerWasDeleted () | 
| Tells 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 prevent users from calling methods that are not designed to be invoked while the task is being processed in a worker thread.
Definition at line 30 of file mlBackgroundTaskHandle.h.
      
  | 
  inline | 
Definition at line 33 of file mlBackgroundTaskHandle.h.
      
  | 
  inlineprotected | 
Definition at line 56 of file mlBackgroundTaskHandle.h.
References mlrange_cast().
| void ml::BackgroundTaskHandle::cancel | ( | ) | 
Cancels 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 | ( | ) | const | 
Returns whether the handle has a task that is not canceled.
| bool ml::BackgroundTaskHandle::hasTask | ( | ) | const | 
Returns whether the handle has a task.
| bool ml::BackgroundTaskHandle::isCanceled | ( | ) | const | 
Returns whether the task was canceled.
| void ml::BackgroundTaskHandle::setOwnerWasDeleted | ( | ) | 
Tells the task that the owner was deleted.
Definition at line 55 of file mlBackgroundTaskHandle.h.
      
  | 
  friend | 
Definition at line 54 of file mlBackgroundTaskHandle.h.
      
  | 
  protected | 
Definition at line 58 of file mlBackgroundTaskHandle.h.
Referenced by ml::BackgroundTaskHandleAccessor::get().