plebble
us::gov::wbgtask Struct Referenceabstract

#include <bgtask.h>

Inheritance diagram for us::gov::wbgtask:
Collaboration diagram for us::gov::wbgtask:

Public Types

typedef bgtask b
 

Public Member Functions

 wbgtask (function< void()> onwakeup)
 
virtual ~wbgtask ()
 
virtual void collect ()=0
 
virtual void task_init ()
 
virtual void task ()=0
 
virtual void task_cleanup ()
 
- Public Member Functions inherited from us::gov::bgtask
 bgtask ()
 
 bgtask (function< void()> run, function< void()> onwakeup)
 
virtual ~bgtask ()
 
void set_run_function (function< void()> r)
 
virtual ko start ()
 
virtual ko wait_ready (const chrono::system_clock::time_point &deadline) const
 
virtual void stop ()
 
virtual void join ()
 
void wakeup ()
 
bool isup () const
 
bool isdown () const
 
bool resumed () const
 
void run_ ()
 
void reset ()
 
bool reset_wait ()
 
bool reset_resume ()
 
bool is_active () const
 
 bgtask ()
 
 bgtask (callback cb0)
 
void set_callback (callback r)
 
ko start ()
 
ko wait_ready (Date deadline)
 
void stop ()
 
void join ()
 
boolean reset_wait ()
 
void wakeup ()
 
boolean reset_resume ()
 
boolean isup ()
 
boolean isdown ()
 
boolean resumed ()
 
void reset ()
 
boolean is_active ()
 

Private Member Functions

void collect_ ()
 
void run ()
 

Additional Inherited Members

- Static Public Attributes inherited from us::gov::bgtask
static const char * KO_81021
 
static ko KO_81021 =new ko("KO 81021 Ready status never reached.")
 
- Protected Attributes inherited from us::gov::bgtask
atomic< short > resume {0}
 
thread * th {nullptr}
 
bool active {false}
 
function< void()> run
 
function< void()> onwakeup
 
mutex mx_ready
 
bool ready {false}
 
condition_variable cv_ready
 
AtomicInteger resume =new AtomicInteger(0)
 
Thread th =null
 
boolean active =false
 
callback cb =null
 
ReentrantLock mx_ready = new ReentrantLock()
 
boolean ready =false
 
Condition cv_ready =mx_ready.newCondition()
 

Member Typedef Documentation

◆ b

Constructor & Destructor Documentation

◆ wbgtask()

us::gov::wbgtask::wbgtask ( function< void()>  onwakeup)

◆ ~wbgtask()

virtual us::gov::wbgtask::~wbgtask ( )
virtual

Member Function Documentation

◆ collect()

virtual void us::gov::wbgtask::collect ( )
pure virtual

Implemented in us::gov::socket::gc_t.

◆ collect_()

void us::gov::wbgtask::collect_ ( )
private

◆ run()

void us::gov::wbgtask::run ( )
private

Reimplemented from us::gov::bgtask.

◆ task()

virtual void us::gov::wbgtask::task ( )
pure virtual

Implemented in us::gov::socket::gc_t.

◆ task_cleanup()

virtual void us::gov::wbgtask::task_cleanup ( )
inlinevirtual

Reimplemented in us::gov::socket::gc_t.

◆ task_init()

virtual void us::gov::wbgtask::task_init ( )
inlinevirtual

Reimplemented in us::gov::socket::gc_t.


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