FTXUI 6.1.9
C++ functional terminal UI.
Loading...
Searching...
No Matches
TaskRunner Class Reference

#include <task_runner.hpp>

Public Member Functions

 TaskRunner ()
 
 ~TaskRunner ()
 
auto PostTask (Task task) -> void
 Schedules a task to be executed immediately.
 
auto PostDelayedTask (Task task, std::chrono::steady_clock::duration duration) -> void
 Schedules a task to be executed after a certain duration.
 
auto RunUntilIdle () -> std::optional< std::chrono::steady_clock::duration >
 Runs the tasks in the queue.
 
auto Run () -> void
 
bool HasImmediateTasks () const
 
size_t ExecutedTasks () const
 

Static Public Member Functions

static auto Current () -> TaskRunner *
 

Detailed Description

Definition at line 12 of file task_runner.hpp.

Constructor & Destructor Documentation

◆ TaskRunner()

Definition at line 13 of file task_runner.cpp.

◆ ~TaskRunner()

~TaskRunner ( )

Definition at line 19 of file task_runner.cpp.

Member Function Documentation

◆ Current()

auto Current ( ) -> TaskRunner*
static

Definition at line 24 of file task_runner.cpp.

◆ PostTask()

auto PostTask ( Task task) -> void

Schedules a task to be executed immediately.

Definition at line 29 of file task_runner.cpp.

◆ PostDelayedTask()

auto PostDelayedTask ( Task task,
std::chrono::steady_clock::duration duration ) -> void

Schedules a task to be executed after a certain duration.

Definition at line 33 of file task_runner.cpp.

◆ RunUntilIdle()

auto RunUntilIdle ( ) -> std::optional<std::chrono::steady_clock::duration>

Runs the tasks in the queue.

Runs the tasks in the queue, return the delay until the next delayed task can be executed.

Definition at line 40 of file task_runner.cpp.

◆ Run()

auto Run ( ) -> void

Definition at line 62 of file task_runner.cpp.

◆ HasImmediateTasks()

bool HasImmediateTasks ( ) const
inline

Definition at line 34 of file task_runner.hpp.

◆ ExecutedTasks()

size_t ExecutedTasks ( ) const
inline

Definition at line 36 of file task_runner.hpp.


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