libMesh
Public Member Functions | List of all members
libMesh::Threads::NonConcurrentThread Class Reference

Simple compatibility class for std::thread 'concurrent' execution. More...

#include <threads.h>

Public Member Functions

template<typename Callable >
 NonConcurrentThread (Callable f)
 Constructor. More...
 
void join ()
 Join is a no-op, since the constructor blocked until completion. More...
 
bool joinable () const
 Always joinable. More...
 

Detailed Description

Simple compatibility class for std::thread 'concurrent' execution.

Not at all concurrent, but provides a compatible interface.

Definition at line 91 of file threads.h.

Constructor & Destructor Documentation

◆ NonConcurrentThread()

template<typename Callable >
libMesh::Threads::NonConcurrentThread::NonConcurrentThread ( Callable  f)
inline

Constructor.

Takes a callable function object and executes it. Our wrapper class actually blocks execution until the thread is complete.

Definition at line 100 of file threads.h.

100 { f(); }

Member Function Documentation

◆ join()

void libMesh::Threads::NonConcurrentThread::join ( )
inline

Join is a no-op, since the constructor blocked until completion.

Definition at line 105 of file threads.h.

Referenced by libMesh::System::read_serialized_blocked_dof_objects().

105 {}

◆ joinable()

bool libMesh::Threads::NonConcurrentThread::joinable ( ) const
inline

Always joinable.

Definition at line 110 of file threads.h.

110 { return true; }

The documentation for this class was generated from the following file: