5#ifndef FLUTTER_FML_THREAD_H_
6#define FLUTTER_FML_THREAD_H_
13#include "flutter/fml/macros.h"
14#include "flutter/fml/task_runner.h"
66 std::unique_ptr<ThreadHandle> thread_;
70 std::atomic_bool joined_;
72 FML_DISALLOW_COPY_AND_ASSIGN(
Thread);
ThreadPriority
Valid values for priority of Thread.
fml::RefPtr< fml::TaskRunner > GetTaskRunner() const
static size_t GetDefaultStackSize()
std::function< void(const ThreadConfig &)> ThreadConfigSetter
Thread(const std::string &name="")
static void SetCurrentThreadName(const ThreadConfig &config)
@ kBackground
Suitable for threads that shouldn't disrupt high priority work.
@ kDisplay
Suitable for threads which generate data for the display.
@ kNormal
Default priority level.
@ kRaster
Suitable for thread which raster data.
Dart_NativeFunction function
DEF_SWITCHES_START aot vmservice shared library name
fml::Thread::ThreadConfig ThreadConfig
The ThreadConfig is the thread info include thread name, thread priority.
ThreadConfig(const std::string &name)
ThreadConfig(const std::string &name, ThreadPriority priority)