Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boost::detail::shared_state_base Struct Reference

#include <future.hpp>

Inheritance diagram for boost::detail::shared_state_base:
Collaboration diagram for boost::detail::shared_state_base:

Public Types

typedef std::list
< boost::condition_variable_any * > 
waiter_list
 
typedef shared_ptr
< shared_state_base
continuation_ptr_type
 

Public Member Functions

virtual void launch_continuation (boost::unique_lock< boost::mutex > &)
 
 shared_state_base ()
 
virtual ~shared_state_base ()
 
void set_deferred ()
 
void set_async ()
 
waiter_list::iterator register_external_waiter (boost::condition_variable_any &cv)
 
void remove_external_waiter (waiter_list::iterator it)
 
void do_continuation (boost::unique_lock< boost::mutex > &)
 
void mark_finished_internal (boost::unique_lock< boost::mutex > &lock)
 
void make_ready ()
 
void do_callback (boost::unique_lock< boost::mutex > &lock)
 
virtual bool run_if_is_deferred ()
 
virtual bool run_if_is_deferred_or_ready ()
 
void wait_internal (boost::unique_lock< boost::mutex > &lk, bool rethrow=true)
 
virtual void wait (bool rethrow=true)
 
void mark_exceptional_finish_internal (boost::exception_ptr const &e, boost::unique_lock< boost::mutex > &lock)
 
void mark_exceptional_finish ()
 
void set_exception_at_thread_exit (exception_ptr e)
 
bool has_value () const
 
bool has_value (unique_lock< boost::mutex > &) const
 
bool has_exception () const
 
bool has_exception (unique_lock< boost::mutex > &) const
 
bool is_deferred (boost::lock_guard< boost::mutex > &) const
 
launch launch_policy (boost::unique_lock< boost::mutex > &) const
 
future_state::state get_state () const
 
exception_ptr get_exception_ptr ()
 
exception_ptr get_exception_ptr (boost::unique_lock< boost::mutex > &lock)
 
template<typename F , typename U >
void set_wait_callback (F f, U *u)
 
virtual void execute (boost::unique_lock< boost::mutex > &)
 
shared_ptr< shared_state_baseshared_from_this ()
 
shared_ptr
< shared_state_baseconst > 
shared_from_this () const
 
void _internal_accept_owner (shared_ptr< X > const *ppx, Y *py) const
 

Public Attributes

boost::exception_ptr exception
 
bool done
 
bool is_deferred_
 
launch policy_
 
bool is_constructed
 
boost::mutex mutex
 
boost::condition_variable waiters
 
waiter_list external_waiters
 
boost::function< void()> callback
 
continuation_ptr_type continuation_ptr
 

Member Typedef Documentation

Constructor & Destructor Documentation

boost::detail::shared_state_base::shared_state_base ( )
inline
virtual boost::detail::shared_state_base::~shared_state_base ( )
inlinevirtual

Member Function Documentation

void boost::enable_shared_from_this< shared_state_base >::_internal_accept_owner ( shared_ptr< X > const *  ppx,
Y *  py 
) const
inlineinherited
void boost::detail::shared_state_base::do_callback ( boost::unique_lock< boost::mutex > &  lock)
inline

References callback.

Referenced by register_external_waiter(), and wait_internal().

void boost::detail::shared_state_base::do_continuation ( boost::unique_lock< boost::mutex > &  )
inline

Referenced by mark_finished_internal().

exception_ptr boost::detail::shared_state_base::get_exception_ptr ( )
inline

References boost::lock().

exception_ptr boost::detail::shared_state_base::get_exception_ptr ( boost::unique_lock< boost::mutex > &  lock)
inline

References exception, and wait_internal().

future_state::state boost::detail::shared_state_base::get_state ( ) const
inline
bool boost::detail::shared_state_base::has_exception ( ) const
inline

References exception, and boost::lock().

bool boost::detail::shared_state_base::has_exception ( unique_lock< boost::mutex > &  ) const
inline

References exception.

bool boost::detail::shared_state_base::has_value ( unique_lock< boost::mutex > &  ) const
inline

References exception.

bool boost::detail::shared_state_base::is_deferred ( boost::lock_guard< boost::mutex > &  ) const
inline

References is_deferred_.

virtual void boost::detail::shared_state_base::launch_continuation ( boost::unique_lock< boost::mutex > &  )
inlinevirtual
launch boost::detail::shared_state_base::launch_policy ( boost::unique_lock< boost::mutex > &  ) const
inline

References policy_.

void boost::detail::shared_state_base::make_ready ( )
inline
void boost::detail::shared_state_base::mark_exceptional_finish_internal ( boost::exception_ptr const e,
boost::unique_lock< boost::mutex > &  lock 
)
inline
waiter_list::iterator boost::detail::shared_state_base::register_external_waiter ( boost::condition_variable_any cv)
inline

References do_callback(), and boost::lock().

void boost::detail::shared_state_base::remove_external_waiter ( waiter_list::iterator  it)
inline

References boost::lock().

virtual bool boost::detail::shared_state_base::run_if_is_deferred ( )
inlinevirtual

References execute().

virtual bool boost::detail::shared_state_base::run_if_is_deferred_or_ready ( )
inlinevirtual

References done, and execute().

void boost::detail::shared_state_base::set_async ( )
inline
void boost::detail::shared_state_base::set_exception_at_thread_exit ( exception_ptr  e)
inline
template<typename F , typename U >
void boost::detail::shared_state_base::set_wait_callback ( f,
U *  u 
)
inline

Member Data Documentation

boost::function<void()> boost::detail::shared_state_base::callback

Referenced by do_callback().

continuation_ptr_type boost::detail::shared_state_base::continuation_ptr
bool boost::detail::shared_state_base::done
boost::exception_ptr boost::detail::shared_state_base::exception
waiter_list boost::detail::shared_state_base::external_waiters
bool boost::detail::shared_state_base::is_constructed
bool boost::detail::shared_state_base::is_deferred_

Referenced by is_deferred().

boost::mutex boost::detail::shared_state_base::mutex
mutable
launch boost::detail::shared_state_base::policy_

Referenced by launch_policy().

boost::condition_variable boost::detail::shared_state_base::waiters

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