5#ifndef FLUTTER_SHELL_PLATFORM_EMBEDDER_EMBEDDER_TASK_RUNNER_H_
6#define FLUTTER_SHELL_PLATFORM_EMBEDDER_EMBEDDER_TASK_RUNNER_H_
9#include <unordered_map>
81 const size_t embedder_identifier_;
82 DispatchTable dispatch_table_;
83 std::mutex tasks_mutex_;
84 uint64_t last_baton_ = 0;
85 std::unordered_map<uint64_t, fml::closure> pending_tasks_;
89 static std::atomic_intptr_t next_unique_id_;
102 bool RunsTasksOnCurrentThread()
override;
bool PostTask(uint64_t baton)
intptr_t unique_id() const
size_t GetEmbedderIdentifier() const
The unique identifier provided by the embedder for the task runner. Embedders whose dispatch tables s...
~EmbedderTaskRunner() override
#define FML_DISALLOW_COPY_AND_ASSIGN(TypeName)
std::function< void()> closure
std::function< void(EmbedderTaskRunner *task_runner, uint64_t task_baton, fml::TimePoint target_time)> post_task_callback
std::function< bool(void)> runs_task_on_current_thread_callback
std::function< void()> destruction_callback
Performs user-designated cleanup on destruction.