|
| task_arena (int max_concurrency_=automatic, unsigned reserved_for_masters=1) |
| Creates task_arena with certain concurrency limits. More...
|
|
| task_arena (const task_arena &s) |
| Copies settings from another task_arena.
|
|
| task_arena (attach) |
| Creates an instance of task_arena attached to the current arena of the thread.
|
|
void | initialize () |
| Forces allocation of the resources for the task_arena as specified in constructor arguments.
|
|
void | initialize (int max_concurrency_, unsigned reserved_for_masters=1) |
| Overrides concurrency level and forces initialization of internal representation.
|
|
void | initialize (attach) |
| Attaches this instance to the current arena of the thread.
|
|
void | terminate () |
|
| ~task_arena () |
|
bool | is_active () const |
|
template<typename F > |
void | enqueue (F &&f) |
|
template<typename F > |
void | enqueue (const F &f) |
|
template<typename F > |
void | enqueue (F &&f, priority_t p) |
|
void | enqueue (const F &f, priority_t p) |
|
template<typename F > |
internal::return_type_or_void
< F >::type | execute (F &f) |
|
template<typename F > |
internal::return_type_or_void
< F >::type | execute (const F &f) |
|
void | debug_wait_until_empty () |
|
int | max_concurrency () const |
| Returns the maximal number of threads that can work inside the arena.
|
|
1-to-1 proxy representation class of scheduler's arena Constructors set up settings only, real construction is deferred till the first method invocation Destructor only removes one of the references to the inner arena representation. Final destruction happens when all the references (and the work) are gone.
template<typename F >
internal::return_type_or_void<F>::type tbb::interface7::task_arena::execute |
( |
F & |
f | ) |
|
|
inline |
Joins the arena and executes a mutable functor, then returns If not possible to join, wraps the functor into a task, enqueues it and waits for task completion Can decrement the arena demand for workers, causing a worker to leave and free a slot to the calling thread Since C++11, the method returns the value returned by functor (prior to C++11 it returns void).
template<typename F >
internal::return_type_or_void<F>::type tbb::interface7::task_arena::execute |
( |
const F & |
f | ) |
|
|
inline |
Joins the arena and executes a constant functor, then returns If not possible to join, wraps the functor into a task, enqueues it and waits for task completion Can decrement the arena demand for workers, causing a worker to leave and free a slot to the calling thread Since C++11, the method returns the value returned by functor (prior to C++11 it returns void).