OmniSciDB  a5dc49c757
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
threading_tbb::future< T > Struct Template Reference

#include <threading_tbb.h>

Public Member Functions

 future ()=default
 
 future (future &&)=default
 
 future (std::unique_ptr< tbb_packaged_task< T >> &&p)
 
void wait ()
 
T & get ()
 

Public Attributes

std::unique_ptr
< tbb_packaged_task< T > > 
task_
 

Detailed Description

template<typename T>
struct threading_tbb::future< T >

Definition at line 44 of file threading_tbb.h.

Constructor & Destructor Documentation

template<typename T >
threading_tbb::future< T >::future ( )
default
template<typename T >
threading_tbb::future< T >::future ( future< T > &&  )
default
template<typename T >
threading_tbb::future< T >::future ( std::unique_ptr< tbb_packaged_task< T >> &&  p)
inline

Definition at line 48 of file threading_tbb.h.

48 : task_(std::move(p)) {}
std::unique_ptr< tbb_packaged_task< T > > task_
Definition: threading_tbb.h:45

Member Function Documentation

template<typename T >
T& threading_tbb::future< T >::get ( )
inline

Definition at line 52 of file threading_tbb.h.

52  {
53  wait();
54  return task_->value_;
55  }
std::unique_ptr< tbb_packaged_task< T > > task_
Definition: threading_tbb.h:45
template<typename T >
void threading_tbb::future< T >::wait ( )
inline

Definition at line 49 of file threading_tbb.h.

References threading_tbb::g_tbb_arena.

49  {
50  g_tbb_arena.execute([this] { task_->wait(); });
51  }
tbb::task_arena g_tbb_arena
std::unique_ptr< tbb_packaged_task< T > > task_
Definition: threading_tbb.h:45

Member Data Documentation

template<typename T >
std::unique_ptr<tbb_packaged_task<T> > threading_tbb::future< T >::task_

Definition at line 45 of file threading_tbb.h.


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