UI-owned move-only cancellation token. Release before Scheduler. Disconnect is immediate logically; an executing callback owns its captures until return. Destruction/move assignment on a foreign thread terminates (affinity contract violation).
More...
#include <scheduler.hpp>
|
|
| Subscription ()=default |
| | Empty disconnected token.
|
|
| ~Subscription () |
| | Disconnect on UI; never joins a worker.
|
| | Subscription (Subscription &&other) noexcept |
| | Transfer ownership on UI.
|
| Subscription & | operator= (Subscription &&other) noexcept |
| | Disconnect old token, then transfer.
|
|
| Subscription (const Subscription &)=delete |
|
Subscription & | operator= (const Subscription &)=delete |
| std::expected< void, SchedulerError > | disconnect () |
| | UI-only, idempotent; WRONG_THREAD leaves unchanged.
|
UI-owned move-only cancellation token. Release before Scheduler. Disconnect is immediate logically; an executing callback owns its captures until return. Destruction/move assignment on a foreign thread terminates (affinity contract violation).
◆ Subscription()
| portals::Subscription::Subscription |
( |
Subscription && | other | ) |
|
|
noexcept |
Transfer ownership on UI.
- Parameters
-
| other | UI-owned token to empty and transfer into this token. |
◆ disconnect()
| std::expected< void, SchedulerError > portals::Subscription::disconnect |
( |
| ) |
|
UI-only, idempotent; WRONG_THREAD leaves unchanged.
- Returns
- Success for an already empty/disconnected token; WRONG_THREAD leaves a live token unchanged.
◆ operator=()
Disconnect old token, then transfer.
- Parameters
-
| other | UI-owned token to empty and transfer; self-assignment is a no-op. |
- Returns
- This token after replacing its previous ownership.
The documentation for this class was generated from the following file: