Move-only cancellation ownership; destruction requests cancellation but never joins.
More...
#include <background.hpp>
|
|
| BackgroundTicket ()=default |
| | Empty inactive ticket.
|
|
| ~BackgroundTicket () |
| | Request cancellation; never wait for a worker.
|
| | BackgroundTicket (BackgroundTicket &&other) noexcept |
| BackgroundTicket & | operator= (BackgroundTicket &&other) noexcept |
|
| BackgroundTicket (const BackgroundTicket &)=delete |
|
BackgroundTicket & | operator= (const BackgroundTicket &)=delete |
| | BackgroundTicket (std::weak_ptr< BackgroundJob > job) |
|
void | cancel () noexcept |
| | Request cooperative cancellation; stop callbacks must return promptly. This retires work without publishing a completion. Its UI owner must also cancel/retire the waiter.
|
Move-only cancellation ownership; destruction requests cancellation but never joins.
◆ BackgroundTicket() [1/2]
| portals::BackgroundTicket::BackgroundTicket |
( |
BackgroundTicket && | other | ) |
|
|
noexcept |
- Parameters
-
| other | Cancellation owner to transfer and empty. |
◆ BackgroundTicket() [2/2]
| portals::BackgroundTicket::BackgroundTicket |
( |
std::weak_ptr< BackgroundJob > | job | ) |
|
|
inlineexplicit |
- Parameters
-
| job | Accepted worker-safe owner, observed without prolonging its completed lifetime. Host executors may construct the same cancellation owner after their own admission. |
◆ operator=()
- Parameters
-
| other | Cancellation owner replacing this one after cancellation. |
- Returns
- This owner; self-assignment is a no-op.
The documentation for this class was generated from the following file: