Reference documentation for deal.II version 9.5.0
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
Loading...
Searching...
No Matches
Classes | Functions
Threads::internal Namespace Reference

Classes

struct  maybe_make_ref
 
struct  maybe_make_ref< T & >
 
struct  return_value
 
struct  return_value< RT & >
 
struct  return_value< void >
 
struct  ThreadDescriptor
 

Functions

template<typename RT >
void call (const std::function< RT()> &function, internal::return_value< RT > &ret_val)
 
void call (const std::function< void()> &function, internal::return_value< void > &)
 
template<typename RT , typename Function >
void evaluate_and_set_promise (Function &function, std::promise< RT > &promise)
 
template<typename Function >
void evaluate_and_set_promise (Function &function, std::promise< void > &promise)
 
void handle_std_exception (const std::exception &exc)
 
void handle_unknown_exception ()
 

Function Documentation

◆ call() [1/2]

template<typename RT >
void Threads::internal::call ( const std::function< RT()> &  function,
internal::return_value< RT > &  ret_val 
)
inline

Definition at line 358 of file thread_management.h.

◆ call() [2/2]

void Threads::internal::call ( const std::function< void()> &  function,
internal::return_value< void > &   
)
inline

Definition at line 366 of file thread_management.h.

◆ evaluate_and_set_promise() [1/2]

template<typename RT , typename Function >
void Threads::internal::evaluate_and_set_promise ( Function function,
std::promise< RT > &  promise 
)

Set the value of a std::promise object by evaluating the action.

Note
This class, function, or variable is a template, and it can only be instantiated if the following condition is true:
(std::invocable<Function> &&
std::convertible_to<std::invoke_result_t<Function>, RT>)
If your compiler supports the C++20 standard, then this constraint will be enforced by a C++20 requires clause.

Definition at line 945 of file thread_management.h.

◆ evaluate_and_set_promise() [2/2]

template<typename Function >
void Threads::internal::evaluate_and_set_promise ( Function function,
std::promise< void > &  promise 
)

Set the value of a std::promise object by evaluating the action. This function is a specialization of the previous one for the case where the return type is void. Consequently, we can't set a value. But we do evaluate the function object and call std::promise::set_value() without argument.

Note
This class, function, or variable is a template, and it can only be instantiated if the following condition is true:
(std::invocable<Function>)
If your compiler supports the C++20 standard, then this constraint will be enforced by a C++20 requires clause.

Definition at line 962 of file thread_management.h.

◆ handle_std_exception()

void Threads::internal::handle_std_exception ( const std::exception &  exc)

Definition at line 35 of file thread_management.cc.

◆ handle_unknown_exception()

void Threads::internal::handle_unknown_exception ( )

Definition at line 75 of file thread_management.cc.