Public Member Functions | Friends | List of all members
async_task Class Referencefinal

Handle for asynchronous tasks. More...

#include <thread_pool.hpp>

Public Member Functions

 ~async_task ()
 If task has not been detached, calls join.
 async_task (async_task const &)=delete
async_taskoperator= (async_task const &)=delete
 async_task (async_task &&other) noexcept
async_taskoperator= (async_task &&other) noexcept
void join ()
 Wait for the task to finish, adds the now idle thread back into the pool.
 operator bool () const
 Check whether it's a spawned, unjoined task.
void detach ()
 Detach the running thread from the task. Once done, the thread adds itself back into the pool.


class thread_pool

Detailed Description

Handle for asynchronous tasks.

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