Foundation
Loading...
Searching...
No Matches
Thread.hpp
Go to the documentation of this file.
1#pragma once
2#include <future>
3#include <thread>
4namespace Foundation::Core
5{
6 template<typename T = void> using Promise = std::promise<T>;
7 template<typename T = void> using Future = std::future<T>;
8
9 using CondVar = std::condition_variable;
10 using Mutex = std::mutex;
15 using Thread = std::jthread;
16}
Lock-free atomic primitives and implementations of data structures.
Definition Allocator.hpp:5
std::mutex Mutex
Definition Thread.hpp:10
std::future< T > Future
Definition Thread.hpp:7
std::condition_variable CondVar
Definition Thread.hpp:9
std::jthread Thread
Alias of std::jthread.
Definition Thread.hpp:15
std::promise< T > Promise
Definition Thread.hpp:6