HeapDispatcher wraps an existing Dispatcher and allocates Task objects on the heap before posting them to the existing Dispatcher. After Tasks run, they are automatically freed.
Public Member Functions | |
| HeapDispatcher (Dispatcher &dispatcher) | |
| Dispatcher & | inner () const |
| Status | PostAt (TaskFunction &&task_func, chrono::SystemClock::time_point time) override |
| Post dispatcher owned |task_func| function to be run at |time|. | |
| void | PostAt (Task &task, chrono::SystemClock::time_point time) override |
| bool | Cancel (Task &task) override |
| chrono::SystemClock::time_point | now () override |
| Returns the current time. | |
Public Member Functions inherited from pw::async::FunctionDispatcher | |
| virtual Status | Post (TaskFunction &&task_func) |
| Post dispatcher owned |task_func| function. | |
| virtual Status | PostAfter (TaskFunction &&task_func, chrono::SystemClock::duration delay) |
| Post dispatcher owned |task_func| function to be run after |delay|. | |
| virtual Status | PostAt (TaskFunction &&task_func, chrono::SystemClock::time_point time)=0 |
| Post dispatcher owned |task_func| function to be run at |time|. | |
| virtual void | Post (Task &task) |
| virtual void | PostAfter (Task &task, chrono::SystemClock::duration delay) |
| virtual void | PostAt (Task &task, chrono::SystemClock::time_point time)=0 |
| virtual void | Post (Task &task) |
| virtual void | PostAfter (Task &task, chrono::SystemClock::duration delay) |
| virtual void | PostAt (Task &task, chrono::SystemClock::time_point time)=0 |
| virtual bool | Cancel (Task &task)=0 |
| virtual SystemClock::time_point | now ()=0 |
| Returns the current time. | |
Additional Inherited Members | |
Static Public Member Functions inherited from pw::chrono::VirtualClock< SystemClock > | |
| static VirtualClock< SystemClock > & | RealClock () |
| Returns a reference to the real system clock to aid instantiation. | |