#include <task_runner_util.h>
Public Member Functions | |
| ConditionalBasicTaskRunner (fml::RefPtr< fml::TaskRunner > task_runner, std::function< bool()> is_usable) | |
| virtual | ~ConditionalBasicTaskRunner ()=default |
| void | PostTask (const fml::closure &task) override |
A BasicTaskRunner that wraps another task runner and takes a function that indicates whether that task runner is still usable.
Before each posted task is run, ConditionalBasicTaskRunner will call the is_usable function on the underlying task runner's thread. If is_usable returns false, then the task will not be executed.
Definition at line 39 of file task_runner_util.h.
|
explicit |
Definition at line 17 of file task_runner_util.cc.
References function.
|
virtualdefault |
|
overridevirtual |
Schedules task to be executed on the TaskRunner's associated event loop.
Implements fml::BasicTaskRunner.
Definition at line 24 of file task_runner_util.cc.
References fml::TaskRunner::PostTask().
Referenced by fml::testing::TEST().