Helios Engine
A modular ECS based data-oriented C++23 game engine framework
Loading...
Searching...
No Matches
helios::async Namespace Reference

Namespaces

namespace  details

Classes

class  AsyncTask
 Handle to an asynchronous task managed by the Executor. More...
class  Executor
 Manages worker threads and executes task graphs using work-stealing scheduling. More...
class  Future
 Wrapper around tf::Future for handling asynchronous task results. More...
class  SubTaskGraph
 Dynamic task graph that can be created within the execution of a task. More...
class  Task
 Represents a single task within a task graph. More...
class  TaskGraph
 Represents a task dependency graph that can be executed by an Executor. More...

Concepts

concept  StaticTask
 Concept for static task callables.
concept  SubTask
 Concept for sub-task callables that receive a SubTaskGraph reference.
concept  AnyTask
 Concept for any valid task callable.

Typedefs

template<typename T = void>
using AsyncResult = std::expected<T, AsyncError>
 Result type for async operations.

Enumerations

enum class  TaskType : uint8_t { kUndefined , kStatic , kSubTask , kAsync }
 Types of tasks in the async system. More...
enum class  AsyncError : uint8_t {
  kInvalidTask , kExecutorShutdown , kTaskNotFound , kInvalidDependency ,
  kCircularDependency , kSchedulingFailed , kThreadNotAvailable
}
 Error codes for async operations. More...

Functions

constexpr std::string_view ToString (AsyncError error) noexcept
 Converts AsyncError to string representation.

Typedef Documentation

◆ AsyncResult

template<typename T = void>
using helios::async::AsyncResult = std::expected<T, AsyncError>

Result type for async operations.

Definition at line 64 of file common.hpp.

Enumeration Type Documentation

◆ AsyncError

enum class helios::async::AsyncError : uint8_t
strong

Error codes for async operations.

Enumerator
kInvalidTask 

Task handle is invalid or empty.

kExecutorShutdown 

Executor has been shut down.

kTaskNotFound 

Specified task could not be found.

kInvalidDependency 

Dependency relationship is invalid.

kCircularDependency 

Circular dependency detected in task graph.

kSchedulingFailed 

Task could not be scheduled for execution.

kThreadNotAvailable 

No worker thread available for execution.

Definition at line 26 of file common.hpp.

◆ TaskType

enum class helios::async::TaskType : uint8_t
strong

Types of tasks in the async system.

Enumerator
kUndefined 
kStatic 

Static task with fixed callable.

kSubTask 

Dynamic task that can spawn subtasks.

kAsync 

Asynchronous task executed independently.

Definition at line 18 of file common.hpp.

Function Documentation

◆ ToString()

std::string_view helios::async::ToString ( AsyncError error)
nodiscardconstexprnoexcept

Converts AsyncError to string representation.

Parameters
errorAsyncError value to convert
Returns
String view describing the error

Definition at line 41 of file common.hpp.