quic/qbox
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
gs::runonsysc::AsyncJob Class Reference

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
 

Member Function Documentation

◆ cancel()

void gs::runonsysc::AsyncJob::cancel ( )
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.


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