5 #ifndef BITCOIN_UTIL_TASK_RUNNER_H 6 #define BITCOIN_UTIL_TASK_RUNNER_H 29 virtual void insert(std::function<
void()> func) = 0;
34 virtual void flush() = 0;
39 virtual size_t size() = 0;
45 void insert(std::function<
void()> func)
override { func(); }
47 size_t size()
override {
return 0; }
52 #endif // BITCOIN_UTIL_TASK_RUNNER_H virtual void insert(std::function< void()> func)=0
The callback can either be queued for later/asynchronous/threaded processing, or be executed immediat...
virtual void flush()=0
Forces the processing of all pending events.
virtual ~TaskRunnerInterface()=default
virtual size_t size()=0
Returns the number of currently pending events.