Intel(R) Threading Building Blocks Doxygen Documentation
version 4.2.3
|
Base class for methods that became static in TBB 3.0. More...
#include <task.h>
Static Private Member Functions | |
static void | spawn (task &t) |
Schedule task for execution when a worker becomes available. More... | |
static void | spawn (task_list &list) |
Spawn multiple tasks and clear list. More... | |
static tbb::internal::allocate_additional_child_of_proxy | allocate_additional_child_of (task &t) |
Like allocate_child, except that task's parent becomes "t", not this. More... | |
static void __TBB_EXPORTED_FUNC | destroy (task &victim) |
Destroy a task. More... | |
Private Attributes | |
__TBB_TASK_BASE_ACCESS | __pad0__: friend class tbb::task |
Additional Inherited Members | |
![]() | |
no_copy (const no_copy &)=delete | |
no_copy ()=default | |
Base class for methods that became static in TBB 3.0.
TBB's evolution caused the "this" argument for several methods to become obsolete. However, for backwards binary compatibility, the new methods need distinct names, otherwise the One Definition Rule would be broken. Hence the new methods are defined in this private base class, and then exposed in class task via using declarations.
|
inlinestaticprivate |
Destroy a task.
Usually, calling this method is unnecessary, because a task is implicitly deleted after its execute() method runs. However, sometimes a task needs to be explicitly deallocated, such as when a root task is used as the parent in spawn_and_wait_for_all.
Definition at line 212 of file task.cpp.
References __TBB_ASSERT, tbb::task::allocated, tbb::internal::generic_scheduler::free_task(), tbb::task::freed, tbb::internal::governor::local_scheduler_weak(), tbb::internal::no_cache, parent, tbb::task::parent(), tbb::task::prefix(), tbb::task::ready, tbb::internal::task_prefix::ref_count, tbb::task::state(), and tbb::task::~task().
Schedule task for execution when a worker becomes available.
Definition at line 1124 of file task.h.
References tbb::internal::task_prefix::next, tbb::internal::task_prefix::owner, tbb::task::prefix(), and tbb::internal::scheduler::spawn().
Spawn multiple tasks and clear list.
Definition at line 1128 of file task.h.
References tbb::task_list::clear(), tbb::task_list::first, and tbb::task_list::next_ptr.
|
private |