OmniSciDB  d2f719934e
 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 45 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 49 of file threading_tbb.h.

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

Member Function Documentation

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

Definition at line 53 of file threading_tbb.h.

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

Definition at line 50 of file threading_tbb.h.

References threading_tbb::g_tbb_arena.

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

Member Data Documentation

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

Definition at line 46 of file threading_tbb.h.


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