Foundation
Loading...
Searching...
No Matches
Classes | Typedefs
Foundation::Async Namespace Reference

Asynchronous programming primitives. More...

Classes

class  ThreadPool
 Atomic, lock-free Thread Pool implementation with fixed bounds. More...
 
struct  ThreadPoolJob
 Job interface for use with ThreadPool. More...
 
class  ThreadPoolLambdaJob
 State-carrying lambda job for use with ThreadPool. More...
 

Typedefs

template<typename T = void>
using Promise = std::promise< T >
 
template<typename T = void>
using Future = std::future< T >
 
template<typename T = void>
using SharedPromise = Core::SharedPtr< std::promise< T > >
 
using Condition = std::condition_variable
 
using Mutex = std::mutex
 
using Thread = std::jthread
 Alias of std::jthread.
 
using JobQueue = MPMCQueue< UniquePtr< ThreadPoolJob > >
 Backing job queue type for ThreadPool.
 

Detailed Description

Asynchronous programming primitives.

Typedef Documentation

◆ Condition

using Foundation::Async::Condition = typedef std::condition_variable

◆ Future

template<typename T = void>
using Foundation::Async::Future = typedef std::future<T>

◆ JobQueue

Backing job queue type for ThreadPool.

◆ Mutex

◆ Promise

template<typename T = void>
using Foundation::Async::Promise = typedef std::promise<T>

◆ SharedPromise

◆ Thread

Alias of std::jthread.

Note
Thread is joinable by default, and will be joined in the destructor.