Copyable worker-safe endpoint for short, always deferred UI commands. The callback and its captures stay exclusively in the UI-owned Scheduler registration. Uses the existing shared CONTROL queue with REJECT; commands are never coalesced. Queue defaults and budgets come from SchedulerOptions (32 entries/32 per dispatch). May outlive its node, scene and scheduler; later publication returns CLOSED.
More...
#include <ui_delivery.hpp>
|
|
| UiEndpoint ()=default |
| | Construct an empty closed endpoint.
|
| std::expected< void, SchedulerError > | post (std::shared_ptr< const T > payload) const |
| | Enqueue without observing execution; never invokes the UI callback inline.
|
| std::expected< UiAcknowledgement, SchedulerError > | postAcknowledged (std::shared_ptr< const T > payload) const |
| | Enqueue with a separate nonblocking execution receipt.
|
|
|
template<class> |
| class | ui::Ref |
template<class T>
class portals::UiEndpoint< T >
Copyable worker-safe endpoint for short, always deferred UI commands. The callback and its captures stay exclusively in the UI-owned Scheduler registration. Uses the existing shared CONTROL queue with REJECT; commands are never coalesced. Queue defaults and budgets come from SchedulerOptions (32 entries/32 per dispatch). May outlive its node, scene and scheduler; later publication returns CLOSED.
- Template Parameters
-
| T | Transitively immutable payload owning all referenced data. Final destruction may occur on UI or a producer; payload deleters must support either and can affect UI dispatch latency. |
◆ post()
Enqueue without observing execution; never invokes the UI callback inline.
- Parameters
-
| payload | Immutable owning value; null is INVALID_ARGUMENT. One envelope is allocated. |
- Returns
- Enqueue acceptance only, or CLOSED, WOULD_BLOCK, NO_MEMORY or INVALID_ARGUMENT. Rejection does not change accepted commands or retry automatically.
◆ postAcknowledged()
Enqueue with a separate nonblocking execution receipt.
- Parameters
-
| payload | Immutable owning value; null is INVALID_ARGUMENT. Allocates envelope and receipt. |
- Returns
- Receipt on acceptance, or exact enqueue error; acceptance never promises execution.
The documentation for this class was generated from the following file: