2#include "libxr_def.hpp"
14 return ErrorCode::BUSY;
Status status_
当前异步任务状态。 The current status of the asynchronous task.
@ BUSY
任务正在执行中。 Task is currently running.
ASync(size_t stack_depth, Thread::Priority priority)
构造 ASync 对象并初始化任务线程。 Constructs an ASync object and initializes the task thread.
ErrorCode AssignJob(Callback job)
分配一个异步任务并准备执行。 Assigns an asynchronous job and prepares for execution.
提供一个通用的回调包装,支持动态参数传递。 Provides a generic callback wrapper, supporting dynamic argument passing.
Priority
线程优先级枚举 Enumeration for thread priorities
LibXR Color Control Library / LibXR终端颜色控制库
constexpr auto min(T1 a, T2 b) -> typename std::common_type< T1, T2 >::type
计算两个数的最小值