Agents 1.4.0
Edge AI Agents SDK
Loading...
Searching...
No Matches
agents::Task< void > Class Reference

Task specialization for void. More...

#include <coroutine_utils.h>

Classes

struct  promise_type
 Promise type for Task. More...

Public Types

using handle_type = std::coroutine_handle<promise_type>
 Handle type for Task.

Public Member Functions

 Task (handle_type h)
 Constructor with handle.
 Task (Task &&other) noexcept
 Constructor with other Task.
Task & operator= (Task &&other) noexcept
 Operator= for Task.
 Task (const Task &)=delete
Task & operator= (const Task &)=delete
bool await_ready () const noexcept
 Await ready for Task.
void await_suspend (std::coroutine_handle<> awaiting)
 Await suspend for Task.
void await_resume ()
 Await resume for Task.
void get_sync ()
 Get the result of the Task synchronously.
bool valid () const noexcept
 Valid for Task.

Detailed Description

Task specialization for void.

Constructor & Destructor Documentation

◆ Task() [1/2]

agents::Task< void >::Task ( handle_type h)
inlineexplicit

Constructor with handle.

Parameters
hThe handle to use

◆ Task() [2/2]

agents::Task< void >::Task ( Task< void > && other)
inlinenoexcept

Constructor with other Task.

Parameters
otherThe other Task to use

Member Function Documentation

◆ await_ready()

bool agents::Task< void >::await_ready ( ) const
inlinenoexcept

Await ready for Task.

Returns
Whether the Task is ready

◆ await_suspend()

void agents::Task< void >::await_suspend ( std::coroutine_handle<> awaiting)
inline

Await suspend for Task.

Parameters
awaitingThe awaiting coroutine handle

◆ operator=()

Task & agents::Task< void >::operator= ( Task< void > && other)
inlinenoexcept

Operator= for Task.

Parameters
otherThe other Task to use
Returns
The Task

◆ valid()

bool agents::Task< void >::valid ( ) const
inlinenoexcept

Valid for Task.

Returns
Whether the Task is valid