BitShares-Core  7.0.2
BitShares blockchain node software and command-line wallet software
Public Types | Public Member Functions | Static Public Member Functions | List of all members
fc::task< R, FunctorSize > Class Template Reference

#include <task.hpp>

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

Public Types

typedef std::shared_ptr< task< R, FunctorSize > > ptr
 
- Public Types inherited from fc::promise_base
typedef std::shared_ptr< promise_baseptr
 
- Public Types inherited from fc::promise< R >
typedef std::shared_ptr< promise< R > > ptr
 

Public Member Functions

virtual ~task ()
 
virtual void cancel (const char *reason FC_CANCELATION_REASON_DEFAULT_ARG) override
 
- Public Member Functions inherited from fc::task_base
void run ()
 
virtual ~task_base ()
 
void retain ()
 
void release ()
 
- Public Member Functions inherited from fc::promise_base
virtual ~promise_base ()
 
const char * get_desc () const
 
bool canceled () const
 
bool ready () const
 
bool error () const
 
void set_exception (const fc::exception_ptr &e)
 
- Public Member Functions inherited from fc::promise< R >
virtual ~promise ()
 
const R & wait (const microseconds &timeout=microseconds::maximum())
 
const R & wait_until (const time_point &tp)
 
void set_value (const R &v)
 
void set_value (R &&v)
 
void on_complete (CompletionHandler &&c)
 

Static Public Member Functions

template<typename Functor >
static ptr create (Functor &&f, const char *desc)
 
- Static Public Member Functions inherited from fc::promise< R >
static ptr create (const char *desc FC_TASK_NAME_DEFAULT_ARG)
 
static ptr create (const R &val)
 
static ptr create (R &&val)
 

Additional Inherited Members

- Protected Member Functions inherited from fc::task_base
void _set_active_context (context *)
 
 task_base (void *func)
 
void run_impl ()
 
void cleanup_task_specific_data ()
 
- Protected Member Functions inherited from fc::promise_base
 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 Member Functions inherited from fc::promise< R >
 promise (const char *desc)
 
 promise (const R &val)
 
 promise (R &&val)
 
- Protected Attributes inherited from fc::task_base
uint64_t _posted_num
 Task priority looks like unsupported feature. More...
 
priority _prio
 
time_point _when
 
context_active_context
 
task_base_next
 
std::vector< detail::specific_data_info > * _task_specific_data
 
fwd< spin_lock, 8 > _spinlock
 
void * _promise_impl
 
void * _functor
 
void(* _destroy_functor )(void *)
 
void(* _run_functor )(void *, void *)
 
- Protected Attributes inherited from fc::promise_base
const char * _cancellation_reason
 
- Protected Attributes inherited from fc::promise< R >
optional< R > result
 

Detailed Description

template<typename R, uint64_t FunctorSize = 64>
class fc::task< R, FunctorSize >

Definition at line 116 of file task.hpp.

Member Typedef Documentation

◆ ptr

template<typename R , uint64_t FunctorSize = 64>
typedef std::shared_ptr<task<R,FunctorSize> > fc::task< R, FunctorSize >::ptr

Definition at line 118 of file task.hpp.

Constructor & Destructor Documentation

◆ ~task()

template<typename R , uint64_t FunctorSize = 64>
virtual fc::task< R, FunctorSize >::~task ( )
inlinevirtual

Definition at line 120 of file task.hpp.

Member Function Documentation

◆ cancel()

template<typename R , uint64_t FunctorSize = 64>
virtual void fc::task< R, FunctorSize >::cancel ( const char *reason  FC_CANCELATION_REASON_DEFAULT_ARG)
inlineoverridevirtual

Reimplemented from fc::task_base.

Definition at line 127 of file task.hpp.

◆ create()

template<typename R , uint64_t FunctorSize = 64>
template<typename Functor >
static ptr fc::task< R, FunctorSize >::create ( Functor &&  f,
const char *  desc 
)
inlinestatic

Definition at line 123 of file task.hpp.


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