Flutter Engine
The Flutter Engine
|
#include <task_runner.h>
Public Member Functions | |
virtual | ~TaskRunner () |
virtual void | PostTask (const fml::closure &task) override |
virtual void | PostTaskForTime (const fml::closure &task, fml::TimePoint target_time) |
virtual void | PostDelayedTask (const fml::closure &task, fml::TimeDelta delay) |
virtual bool | RunsTasksOnCurrentThread () |
virtual TaskQueueId | GetTaskQueueId () |
Public Member Functions inherited from fml::RefCountedThreadSafe< TaskRunner > | |
void | Release () const |
Public Member Functions inherited from fml::internal::RefCountedThreadSafeBase | |
void | AddRef () const |
bool | HasOneRef () const |
void | AssertHasOneRef () const |
virtual void | PostTask (const fml::closure &task)=0 |
Static Public Member Functions | |
static void | RunNowOrPostTask (const fml::RefPtr< fml::TaskRunner > &runner, const fml::closure &task) |
Protected Member Functions | |
TaskRunner (fml::RefPtr< MessageLoopImpl > loop) | |
Protected Member Functions inherited from fml::RefCountedThreadSafe< TaskRunner > | |
RefCountedThreadSafe () | |
~RefCountedThreadSafe () | |
Protected Member Functions inherited from fml::internal::RefCountedThreadSafeBase | |
RefCountedThreadSafeBase () | |
~RefCountedThreadSafeBase () | |
bool | Release () const |
void | Adopt () |
The object for scheduling tasks on a fml::MessageLoop
.
Typically there is one TaskRunner
associated with each thread. When one wants to execute an operation on that thread they post a task to the TaskRunner.
Definition at line 34 of file task_runner.h.
|
virtualdefault |
|
explicitprotected |
Definition at line 19 of file task_runner.cc.
|
virtual |
Returns the unique identifier associated with the TaskRunner.
Definition at line 38 of file task_runner.cc.
|
virtual |
Schedules a task to be run on the MessageLoop after the time delay
has passed.
Reimplemented in flutter_runner::CompatTaskRunner.
Definition at line 33 of file task_runner.cc.
|
overridevirtual |
Schedules task
to be executed on the TaskRunner's associated event loop.
Implements fml::BasicTaskRunner.
Reimplemented in flutter_runner::CompatTaskRunner.
Definition at line 24 of file task_runner.cc.
|
virtual |
Reimplemented in flutter_runner::CompatTaskRunner.
Definition at line 28 of file task_runner.cc.
|
static |
Executes the task
directly if the TaskRunner runner
is the TaskRunner associated with the current executing thread.
Definition at line 55 of file task_runner.cc.
|
virtual |
Returns true
when the current executing thread's TaskRunner matches this instance.
Reimplemented in flutter_runner::CompatTaskRunner.
Definition at line 43 of file task_runner.cc.