# FTXUI: TaskQueue Struct Reference

Loading...
Searching...
No Matches
TaskQueue Struct Reference

`#include <task_queue.hpp>`

## Public Types

using | MaybeTask

## Public Member Functions

auto | PostTask (PendingTask task) -> void
auto | Get () -> MaybeTask
bool | HasImmediateTasks () const

## Detailed Description

A task queue that schedules tasks to be executed in the future. Tasks can be scheduled to be executed immediately, or after a certain duration.

- The tasks are executed in the order they were scheduled.
- If multiple tasks are scheduled to be executed at the same time, they are executed in the order they were scheduled.
- If a task is scheduled to be executed in the past, it is executed immediately.

Definition at line 21 of file task_queue.hpp.

## Member Typedef Documentation

## MaybeTask

using MaybeTask

Initial value:
std::variant<Task, std::chrono::steady_clock::duration, std::monostate>

Definition at line 24 of file task_queue.hpp.

## Member Function Documentation

## PostTask()

auto PostTask | ( | PendingTask | task | ) | -> void

Definition at line 8 of file task_queue.cpp.

## Get()

auto Get | ( |  | ) | -> MaybeTask

Definition at line 22 of file task_queue.cpp.

## HasImmediateTasks()

bool HasImmediateTasks | ( |  | ) | const

inline

Definition at line 28 of file task_queue.hpp.

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

- task_queue.hpp
- task_queue.cpp