|
quic/qbox
|
Public Types | |
| using | Ptr = std::shared_ptr< AsyncJob > |
Public Member Functions | |
| AsyncJob (std::function< void()> &&job) | |
| AsyncJob (std::function< void()> &job) | |
| AsyncJob (const AsyncJob &)=delete | |
| void | operator() () |
| void | cancel () |
| Cancel a job. | |
| void | wait () |
| bool | is_cancelled () const |
|
inline |
Cancel a job.
Cancel a job by setting m_cancelled to true and by resetting the task. Any waiter will then be unblocked immediately.