Home ⌂Doc Index ◂Up ▴
Intel(R) Threading Building Blocks Doxygen Documentation  version 4.2.3
tbb::task_handle< F > Class Template Reference

#include <task_group.h>

Inheritance diagram for tbb::task_handle< F >:
Collaboration diagram for tbb::task_handle< F >:

Public Member Functions

 task_handle (const F &f)
 
 task_handle (F &&f)
 
void operator() () const
 

Private Member Functions

void mark_scheduled ()
 
- Private Member Functions inherited from tbb::internal::no_assign
void operator= (const no_assign &)=delete
 
 no_assign (const no_assign &)=default
 
 no_assign ()=default
 

Private Attributes

my_func
 
intptr_t my_state
 

Static Private Attributes

static const intptr_t scheduled = 0x1
 

Friends

template<typename _F >
class internal::task_handle_task
 
class task_group
 
class structured_task_group
 

Detailed Description

template<typename F>
class tbb::task_handle< F >

Definition at line 45 of file task_group.h.

Constructor & Destructor Documentation

◆ task_handle() [1/2]

template<typename F>
tbb::task_handle< F >::task_handle ( const F &  f)
inline

Definition at line 65 of file task_group.h.

65 : my_func(f), my_state(0) {}
intptr_t my_state
Definition: task_group.h:56

◆ task_handle() [2/2]

template<typename F>
tbb::task_handle< F >::task_handle ( F &&  f)
inline

Definition at line 67 of file task_group.h.

67 : my_func( std::move(f)), my_state(0) {}
intptr_t my_state
Definition: task_group.h:56
void move(tbb_thread &t1, tbb_thread &t2)
Definition: tbb_thread.h:319

Member Function Documentation

◆ mark_scheduled()

template<typename F>
void tbb::task_handle< F >::mark_scheduled ( )
inlineprivate

Definition at line 58 of file task_group.h.

58  {
59  // The check here is intentionally lax to avoid the impact of interlocked operation
60  if ( my_state & scheduled )
63  }
intptr_t my_state
Definition: task_group.h:56
static const intptr_t scheduled
Definition: task_group.h:53
void throw_exception(exception_id eid)
Versionless convenience wrapper for throw_exception_v4()

References tbb::internal::eid_invalid_multiple_scheduling, tbb::task_handle< F >::my_state, tbb::task_handle< F >::scheduled, and tbb::internal::throw_exception().

Here is the call graph for this function:

◆ operator()()

template<typename F>
void tbb::task_handle< F >::operator() ( ) const
inline

Definition at line 70 of file task_group.h.

70 { my_func(); }

References tbb::task_handle< F >::my_func.

Friends And Related Function Documentation

◆ internal::task_handle_task

template<typename F>
template<typename _F >
friend class internal::task_handle_task
friend

Definition at line 46 of file task_group.h.

◆ structured_task_group

template<typename F>
friend class structured_task_group
friend

Definition at line 48 of file task_group.h.

◆ task_group

template<typename F>
friend class task_group
friend

Definition at line 47 of file task_group.h.

Member Data Documentation

◆ my_func

template<typename F>
F tbb::task_handle< F >::my_func
private

Definition at line 55 of file task_group.h.

Referenced by tbb::task_handle< F >::operator()().

◆ my_state

template<typename F>
intptr_t tbb::task_handle< F >::my_state
private

Definition at line 56 of file task_group.h.

Referenced by tbb::task_handle< F >::mark_scheduled().

◆ scheduled

template<typename F>
const intptr_t tbb::task_handle< F >::scheduled = 0x1
staticprivate

Definition at line 53 of file task_group.h.

Referenced by tbb::task_handle< F >::mark_scheduled().


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

Copyright © 2005-2020 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its subsidiaries in the United States and other countries.

* Other names and brands may be claimed as the property of others.