1 #ifndef SILICIUM_STD_THREADING_HPP
2 #define SILICIUM_STD_THREADING_HPP
5 #if SILICIUM_HAS_EXCEPTIONS
9 #include <condition_variable>
15 #if SILICIUM_HAS_EXCEPTIONS
19 typedef std::future<T> type;
24 typedef std::promise<T> type;
26 template <
class Result>
29 typedef std::packaged_task<Result ()> type;
35 #if SILICIUM_HAS_EXCEPTIONS
36 template <
class Action,
class ...Args>
37 static auto launch_async(Action &&action, Args &&...args) -> std::future<decltype(action(std::forward<Args>(args)...))>
39 return std::async(std::launch::async, std::forward<Action>(action), std::forward<Args>(args)...);
std::condition_variable condition_variable
Definition: std_threading.hpp:33
Definition: absolute_path.hpp:19
Definition: std_threading.hpp:13
std::unique_lock< std::mutex > unique_lock
Definition: std_threading.hpp:34
std::mutex mutex
Definition: std_threading.hpp:32