1 #ifndef teca_owned_future_h
2 #define teca_owned_future_h
8 template <
typename data_t>
26 m_future = std::move(other.m_future);
33 return std::this_thread::get_id() ==
m_owner;
a future that is owned by a single thread
Definition: teca_owned_future.h:10
data_t & get()
access the managed future's data
Definition: teca_owned_future.h:37
owned_future(owned_future &&other)
move construct from another instance
Definition: teca_owned_future.h:16
bool owner()
true if this future belongs to the calling thread
Definition: teca_owned_future.h:31
owned_future(std::future< data_t > &&future)
move contruct from std::future
Definition: teca_owned_future.h:20
std::future< data_t > m_future
the managed future
Definition: teca_owned_future.h:39
void operator=(owned_future &&other)
move assign form anotehr instance
Definition: teca_owned_future.h:24
std::thread::id m_owner
the thread id of the thread which created the future
Definition: teca_owned_future.h:40