class synchronous_executor
Defined at line 23 of file ../../src/devices/lib/synchronous-executor/include/lib/synchronous-executor/executor.h
A simple synchronous executor that immediately executes all the tasks in its
run queue when invoked. Rather than blocking for new tasks, it will stop
once its queue is empty. It is also re-entrant (may safely call run
from inside a task on the executor).
See documentation of |fpromise::promise| for more information.
Public Methods
void schedule_task (fpromise::pending_task task)
Schedules a task for eventual execution by the executor.
This method is thread-safe.
Defined at line 12 of file ../../src/devices/lib/synchronous-executor/executor.cc
void run_until_idle ()
Runs all scheduled tasks (including additional tasks scheduled while
they run) until none remain. Tasks executed from run may safely call run
reentrantly.
This method is thread-safe.
Defined at line 17 of file ../../src/devices/lib/synchronous-executor/executor.cc
void synchronous_executor ()
Defined at line 25 of file ../../src/devices/lib/synchronous-executor/include/lib/synchronous-executor/executor.h
void ~synchronous_executor ()
Destroys the executor along with all of its remaining scheduled tasks
that have yet to complete.
Defined at line 29 of file ../../src/devices/lib/synchronous-executor/include/lib/synchronous-executor/executor.h
void synchronous_executor (synchronous_executor && )
Defined at line 43 of file ../../src/devices/lib/synchronous-executor/include/lib/synchronous-executor/executor.h
synchronous_executor & operator= (synchronous_executor && )
Defined at line 44 of file ../../src/devices/lib/synchronous-executor/include/lib/synchronous-executor/executor.h