#include <execution_priority_queue.hpp>
◆ add()
template<typename Function >
void appbase::execution_priority_queue::add |
( |
int | priority, |
|
|
Function | function ) |
|
inline |
Definition at line 24 of file execution_priority_queue.hpp.
25 {
26 std::unique_ptr<queued_handler_base> handler(new queued_handler<Function>(priority, --order_, std::move(function)));
27
28 handlers_.push(std::move(handler));
29 }
◆ execute_all()
void appbase::execution_priority_queue::execute_all |
( |
| ) |
|
|
inline |
Definition at line 31 of file execution_priority_queue.hpp.
32 {
33 while (!handlers_.empty()) {
34 handlers_.top()->execute();
35 handlers_.pop();
36 }
37 }
◆ execute_highest()
bool appbase::execution_priority_queue::execute_highest |
( |
| ) |
|
|
inline |
Definition at line 39 of file execution_priority_queue.hpp.
40 {
41 if( !handlers_.empty() ) {
42 handlers_.top()->execute();
43 handlers_.pop();
44 }
45
46 return !handlers_.empty();
47 }
◆ size()
size_t appbase::execution_priority_queue::size |
( |
| ) |
|
|
inline |
◆ wrap()
template<typename Function >
boost::asio::executor_binder< Function, executor > appbase::execution_priority_queue::wrap |
( |
int | priority, |
|
|
Function && | func ) |
|
inline |
Definition at line 102 of file execution_priority_queue.hpp.
103 {
104 return boost::asio::bind_executor( executor(*this, priority), std::forward<Function>(func) );
105 }
The documentation for this class was generated from the following file: