MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches
MayaFlux::Kriya::GetEventPromise Struct Reference

Event-domain promise accessor with optional NetworkSource ownership transfer. More...

#include <GetPromise.hpp>

+ Inheritance diagram for MayaFlux::Kriya::GetEventPromise:
+ Collaboration diagram for MayaFlux::Kriya::GetEventPromise:

Public Member Functions

Vruta::event_promiseawait_resume () const noexcept
 
 GetEventPromise (std::shared_ptr< Vruta::NetworkSource > source=nullptr)
 
- Public Member Functions inherited from MayaFlux::Kriya::GetPromiseBase< Vruta::event_promise >
bool await_ready () const noexcept
 
promise_handleawait_resume () const noexcept
 
void await_suspend (std::coroutine_handle< promise_handle > h) noexcept
 
 GetPromiseBase ()=default
 

Private Attributes

std::shared_ptr< Vruta::NetworkSourcem_source
 

Additional Inherited Members

- Public Types inherited from MayaFlux::Kriya::GetPromiseBase< Vruta::event_promise >
using promise_handle = Vruta::event_promise
 
- Public Attributes inherited from MayaFlux::Kriya::GetPromiseBase< Vruta::event_promise >
promise_handlepromise_ptr
 Pointer to store the promise object.
 

Detailed Description

Event-domain promise accessor with optional NetworkSource ownership transfer.

Extends GetPromiseBase for the event domain. When constructed with a NetworkSource, deposits it into the promise's owned_sources on await_resume, binding the source lifetime to the coroutine frame.

Users familiar with coroutine mechanics are expected to use this as the designated entry point for resource ownership in Event coroutines.

auto handler = []() -> Vruta::Event {
auto source = std::make_shared<Vruta::NetworkSource>(
co_await Kriya::GetEventPromise{ source };
while (true) {
auto msg = co_await source->next_message();
}
};
Coroutine type for event-driven suspension.
Definition Event.hpp:26
Describes one logical send/receive endpoint managed by a backend.
Event-domain promise accessor with optional NetworkSource ownership transfer.

Definition at line 111 of file GetPromise.hpp.


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