BitShares-Core  7.0.0
BitShares blockchain node software and command-line wallet software
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
fc::promise_base Class Reference

#include <future.hpp>

Inheritance diagram for fc::promise_base:
fc::promise< T > fc::promise< void > fc::task_base fc::promise< R > fc::promise< size_t > fc::task< void, FunctorSize > fc::task< R, FunctorSize > fc::task< void, FunctorSize > fc::task< R, FunctorSize >

Public Types

typedef std::shared_ptr< promise_baseptr
 

Public Member Functions

virtual ~promise_base ()
 
const char * get_desc () const
 
virtual void cancel (const char *reason FC_CANCELATION_REASON_DEFAULT_ARG)
 
bool canceled () const
 
bool ready () const
 
bool error () const
 
void set_exception (const fc::exception_ptr &e)
 

Protected Member Functions

 promise_base (const char *desc FC_TASK_NAME_DEFAULT_ARG)
 
void _wait (const microseconds &timeout_us)
 
void _wait_until (const time_point &timeout_us)
 
void _notify ()
 
void _set_value (const void *v)
 
void _on_complete (detail::completion_handler *c)
 

Protected Attributes

const char * _cancellation_reason
 

Friends

class thread
 
struct context
 
class thread_d
 

Detailed Description

Definition at line 61 of file future.hpp.

Member Typedef Documentation

◆ ptr

typedef std::shared_ptr<promise_base> fc::promise_base::ptr

Definition at line 63 of file future.hpp.

Constructor & Destructor Documentation

◆ ~promise_base()

fc::promise_base::~promise_base ( )
virtual

Definition at line 24 of file future.cpp.

◆ promise_base()

fc::promise_base::promise_base ( const char *desc  FC_TASK_NAME_DEFAULT_ARG)
protected

Definition at line 11 of file future.cpp.

Member Function Documentation

◆ _notify()

void fc::promise_base::_notify ( )
protected

Definition at line 115 of file future.cpp.

◆ _on_complete()

void fc::promise_base::_on_complete ( detail::completion_handler c)
protected

Definition at line 134 of file future.cpp.

◆ _set_value()

void fc::promise_base::_set_value ( const void *  v)
protected

Definition at line 124 of file future.cpp.

◆ _wait()

void fc::promise_base::_wait ( const microseconds timeout_us)
protected

Definition at line 49 of file future.cpp.

◆ _wait_until()

void fc::promise_base::_wait_until ( const time_point timeout_us)
protected

Definition at line 55 of file future.cpp.

◆ cancel()

void fc::promise_base::cancel ( const char *reason  FC_CANCELATION_REASON_DEFAULT_ARG)
virtual

Reimplemented in fc::task< void, FunctorSize >, fc::task< R, FunctorSize >, and fc::task_base.

Definition at line 30 of file future.cpp.

◆ canceled()

bool fc::promise_base::canceled ( ) const
inline

Definition at line 69 of file future.hpp.

◆ error()

bool fc::promise_base::error ( ) const

Definition at line 40 of file future.cpp.

◆ get_desc()

const char * fc::promise_base::get_desc ( ) const

Definition at line 26 of file future.cpp.

◆ ready()

bool fc::promise_base::ready ( ) const

Definition at line 37 of file future.cpp.

◆ set_exception()

void fc::promise_base::set_exception ( const fc::exception_ptr e)

Definition at line 44 of file future.cpp.

Friends And Related Function Documentation

◆ context

friend struct context
friend

Definition at line 90 of file future.hpp.

◆ thread

friend class thread
friend

Definition at line 89 of file future.hpp.

◆ thread_d

friend class thread_d
friend

Definition at line 91 of file future.hpp.

Member Data Documentation

◆ _cancellation_reason

const char* fc::promise_base::_cancellation_reason
protected

Definition at line 101 of file future.hpp.


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