Flutter Engine
The Flutter Engine
Public Attributes | List of all members
FlutterTaskRunnerDescription Struct Reference

#include <embedder.h>

Public Attributes

size_t struct_size
 The size of this struct. Must be sizeof(FlutterTaskRunnerDescription). More...
 
void * user_data
 
BoolCallback runs_task_on_current_thread_callback
 
FlutterTaskRunnerPostTaskCallback post_task_callback
 
size_t identifier
 

Detailed Description

An interface used by the Flutter engine to execute tasks at the target time on a specified thread. There should be a 1-1 relationship between a thread and a task runner. It is undefined behavior to run a task on a thread that is not associated with its task runner.

Definition at line 1564 of file embedder.h.

Member Data Documentation

◆ identifier

size_t FlutterTaskRunnerDescription::identifier

A unique identifier for the task runner. If multiple task runners service tasks on the same thread, their identifiers must match.

Definition at line 1586 of file embedder.h.

◆ post_task_callback

FlutterTaskRunnerPostTaskCallback FlutterTaskRunnerDescription::post_task_callback

May be called from any thread. The given task should be executed by the embedder on the thread associated with that task runner by calling FlutterEngineRunTask at the given target time. The system monotonic clock should be used for the target time. The target time is the absolute time from epoch (NOT a delta) at which the task must be returned back to the engine on the correct thread. If the embedder needs to calculate a delta, FlutterEngineGetCurrentTime may be called and the difference used as the delta.

Attention
This field is required.

Definition at line 1583 of file embedder.h.

◆ runs_task_on_current_thread_callback

BoolCallback FlutterTaskRunnerDescription::runs_task_on_current_thread_callback

May be called from any thread. Should return true if tasks posted on the calling thread will be run on that same thread.

Attention
This field is required.

Definition at line 1572 of file embedder.h.

◆ struct_size

size_t FlutterTaskRunnerDescription::struct_size

The size of this struct. Must be sizeof(FlutterTaskRunnerDescription).

Definition at line 1566 of file embedder.h.

◆ user_data

void* FlutterTaskRunnerDescription::user_data

Definition at line 1567 of file embedder.h.


The documentation for this struct was generated from the following file: