MySQL 8.4.0
Source Code Documentation
net::io_context::DeferredWork Class Reference

queued work from io_context::executor_type::dispatch()/post()/defer(). More...


class  BasicCallable
class  Callable

Public Types

using op_type = std::unique_ptr< BasicCallable >

Public Member Functions

size_t run_one ()
 run a deferred work item. More...
template<class Func , class ProtoAllocator >
void post (Func &&f, const ProtoAllocator &)
 queue work for later execution. More...
bool has_outstanding_work () const
 check if work is queued for later execution. More...

Private Attributes

std::mutex work_mtx_
std::list< op_typework_

Detailed Description

queued work from io_context::executor_type::dispatch()/post()/defer().

Member Typedef Documentation

◆ op_type

Member Function Documentation

◆ has_outstanding_work()

bool net::io_context::DeferredWork::has_outstanding_work ( ) const

check if work is queued for later execution.

Return values
trueif some work is queued.

◆ post()

template<class Func , class ProtoAllocator >
void net::io_context::DeferredWork::post ( Func &&  f,
const ProtoAllocator &   

queue work for later execution.

◆ run_one()

size_t net::io_context::DeferredWork::run_one ( )

run a deferred work item.

number work items run.
Return values
0work queue was empty, nothing was run.

Member Data Documentation

◆ work_

std::list<op_type> net::io_context::DeferredWork::work_

◆ work_mtx_

std::mutex net::io_context::DeferredWork::work_mtx_

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