Sese Framework  3.0.0
A cross-platform framework
Loading...
Searching...
No Matches
Async.h File Reference

Asynchronous task executor. More...

#include <sese/thread/GlobalThreadPool.h>
#include <coroutine>

Go to the source code of this file.

Classes

class  sese::DefaultPromise
 
class  sese::DefaultPromise::promise_type
 
class  sese::UseCoroutine
 
class  sese::FutureAwaiter< T >
 

Namespaces

namespace  sese
 

Functions

template<class RETURN_TYPE >
std::shared_future< RETURN_TYPE > sese::async (const std::function< RETURN_TYPE()> &task) noexcept
 Launch an anonymous thread to execute a task.
 
template<class RETURN_TYPE >
auto sese::async (UseCoroutine, const std::function< RETURN_TYPE()> &task) noexcept
 Launch an anonymous thread to execute a task.
 
template<class RETURN_TYPE >
std::shared_future< RETURN_TYPE > sese::async (ThreadPool &pool, const std::function< RETURN_TYPE()> &task) noexcept
 Submit a task to an existing thread pool.
 
template<class RETURN_TYPE >
auto sese::async (UseCoroutine, ThreadPool &pool, const std::function< RETURN_TYPE()> &task) noexcept
 Submit a task to an existing thread pool.
 
template<class RETURN_TYPE >
std::shared_future< RETURN_TYPE > sese::asyncWithGlobalPool (const std::function< RETURN_TYPE()> &task) noexcept
 Submit a task to the global thread pool.
 
template<class RETURN_TYPE >
auto sese::asyncWithGlobalPool (UseCoroutine, const std::function< RETURN_TYPE()> &task) noexcept
 Submit a task to the global thread pool.
 

Detailed Description

Asynchronous task executor.

Date
August 5, 2023
Author
kaoru