rili::TaskGuard Class Referencefinal

Public Member Functions

 TaskGuard (Context &context)
 
 ~TaskGuard ()
 
rili::Contextcontext () noexcept
 

Detailed Description

TaskGuard allow to instruct rili::Context, that asynchronous operation is ongoing in background, which result will be handled in given rili::Context instance. This prevent rili::Context to finish execution of rili::Context::run() before all tasks will be ready to schedule.

Remarks
is non-copyable
See also
rili::Context

Constructor & Destructor Documentation

rili::TaskGuard::TaskGuard ( Context context)
explicit

During execution will call rili::Context::reserve() on provided context.

Parameters
contextis object on which rili::TaskGuard should operate.
rili::TaskGuard::~TaskGuard ( )

During rili::TaskGuard destruction rili::Context::release() will be called on context provided in constructor.

Member Function Documentation

rili::Context& rili::TaskGuard::context ( )
noexcept

may be used to retreive rili::Context associated which rili::TaskGuard

Returns
associated rili::Context

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