|
rippled
|
Maintains a queue of functors that can be called later. More...

Classes | |
| class | BasicWork |
| class | Work |
Public Member Functions | |
| FunctionQueue ()=default | |
| bool | empty () |
Returns true if there is no remaining work. More... | |
| template<typename Function > | |
| void | post (Function f) |
| Queue a function. More... | |
| void | run () |
| Run all pending functions. More... | |
Private Attributes | |
| std::list< std::unique_ptr< BasicWork > > | m_work |
Maintains a queue of functors that can be called later.
Definition at line 28 of file FunctionQueue.h.
|
explicitdefault |
| bool ripple::PeerFinder::Sim::FunctionQueue::empty | ( | ) |
Returns true if there is no remaining work.
Definition at line 66 of file FunctionQueue.h.
| void ripple::PeerFinder::Sim::FunctionQueue::post | ( | Function | f | ) |
Queue a function.
Function must be callable with this signature: void (void)
Definition at line 77 of file FunctionQueue.h.
| void ripple::PeerFinder::Sim::FunctionQueue::run | ( | ) |
Run all pending functions.
The functions will be invoked in the order they were queued.
Definition at line 86 of file FunctionQueue.h.
|
private |
Definition at line 61 of file FunctionQueue.h.
1.8.17