Invocable that completes a future when called with arguments of type Args...; created by package().
More...
#include <future.hpp>
|
|
| packaged_task (const packaged_task &)=delete |
|
auto | operator= (const packaged_task &) -> packaged_task &=delete |
|
| packaged_task (packaged_task &&) noexcept=default |
|
auto | operator= (packaged_task &&x) noexcept -> packaged_task &=default |
|
template<class... A> |
| void | operator() (A &&... args) noexcept |
| | Invokes the packaged callable with args and completes the associated future. Clears _co_handle before reset so ~shared_task() will not destroy the coroutine; the coroutine is destroyed in final_awaiter::await_suspend (coroutine is suspended there).
|
|
auto | canceled () const -> bool |
| | True if the associated future was released.
|
|
void | set_exception (const std::exception_ptr &error) noexcept |
| | Completes the future with error without invoking the callable.
|
template<class... Args>
class stlab::packaged_task< Args >
Invocable that completes a future when called with arguments of type Args...; created by package().
The documentation for this class was generated from the following file: