HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
WorkImpl_Dispatcher Class Reference

#include <dispatcher_impl.h>

Classes

struct  _InvokerTaskWrapper
 

Public Member Functions

WORK_API WorkImpl_Dispatcher ()
 Construct a new dispatcher. More...
 
WORK_API ~WorkImpl_Dispatcher () noexcept
 Wait() for any pending tasks to complete, then destroy the dispatcher. More...
 
 WorkImpl_Dispatcher (WorkImpl_Dispatcher const &)=delete
 
WorkImpl_Dispatcheroperator= (WorkImpl_Dispatcher const &)=delete
 
template<class Callable >
void Run (Callable &&c)
 
WORK_API void Reset ()
 Reinitialize context for WorkImpl_Dispatcher if it has one. More...
 
WORK_API void Wait ()
 Block until the work started by Run() completes. More...
 
WORK_API void Cancel ()
 

Public Attributes

tbb::task_group_context _context
 
tbb::empty_task * _rootTask
 

Detailed Description

Definition at line 29 of file dispatcher_impl.h.

Constructor & Destructor Documentation

WORK_API WorkImpl_Dispatcher::WorkImpl_Dispatcher ( )

Construct a new dispatcher.

WORK_API WorkImpl_Dispatcher::~WorkImpl_Dispatcher ( )
noexcept

Wait() for any pending tasks to complete, then destroy the dispatcher.

WorkImpl_Dispatcher::WorkImpl_Dispatcher ( WorkImpl_Dispatcher const &  )
delete

Member Function Documentation

WORK_API void WorkImpl_Dispatcher::Cancel ( )

Cancel remaining work and return immediately.

Calling this function affects task that are being run directly by this dispatcher. If any of these tasks are using their own dispatchers to run tasks, these dispatchers will not be affected and these tasks will run to completion, unless they are also explicitly cancelled.

This call does not block. Call Wait() after Cancel() to wait for pending tasks to complete.

WorkImpl_Dispatcher& WorkImpl_Dispatcher::operator= ( WorkImpl_Dispatcher const &  )
delete
WORK_API void WorkImpl_Dispatcher::Reset ( )

Reinitialize context for WorkImpl_Dispatcher if it has one.

template<class Callable >
void WorkImpl_Dispatcher::Run ( Callable &&  c)
inline

Definition at line 42 of file dispatcher_impl.h.

WORK_API void WorkImpl_Dispatcher::Wait ( )

Block until the work started by Run() completes.

Member Data Documentation

tbb::task_group_context WorkImpl_Dispatcher::_context

Definition at line 91 of file dispatcher_impl.h.

tbb::empty_task* WorkImpl_Dispatcher::_rootTask

Definition at line 104 of file dispatcher_impl.h.


The documentation for this class was generated from the following file: