class
AsyncTaskclass to create a dependent asynchronous task
A tf::
// main thread retains shared ownership of async task A tf::AsyncTask A = executor.silent_dependent_async([](){}); // task A remains alive (i.e., at least one ref count by the main thread) // when being added to the dependency list of async task B tf::AsyncTask B = executor.silent_dependent_async([](){}, A);
Currently, tf::
Constructors, destructors, conversion operators
- AsyncTask() defaulted
- constructs an empty task handle
- ~AsyncTask() defaulted
- destroys the managed asynchronous task if this is the last owner
- AsyncTask(const AsyncTask& rhs) defaulted
- constructs an task that shares ownership of
rhs
- AsyncTask(AsyncTask&& rhs) defaulted
- move-constructs an task from
rhs
Public functions
- auto operator=(const AsyncTask& rhs) -> AsyncTask& defaulted
- shares ownership of the task managed by
rhs
- auto operator=(AsyncTask&& rhs) -> AsyncTask& defaulted
- move-assigns the task from
rhs
- auto empty() const -> bool
- checks if the task stores a non-null shared pointer
- void reset()
- release the ownership
- auto hash_value() const -> size_t
- obtains a hash value of the underlying node