Lumiera  0.pre.03
»edityourfreedom«
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
ThreadJoinable Class Reference

#include "backend/thread-wrapper.hpp"

Description

Variant of the standard case, allowing additionally to join on the termination of this thread.

Definition at line 259 of file thread-wrapper.hpp.

Public Member Functions

template<class FUN >
 ThreadJoinable (Literal purpose, FUN &&operation, NoBugFlag logging_flag=&NOBUG_FLAG(thread))
 
lib::Result< void > join ()
 put the caller into a blocking wait until this thread has terminated. More...
 
- Public Member Functions inherited from Thread
template<class FUN >
 Thread (Literal purpose, FUN &&operation, NoBugFlag logging_flag=&NOBUG_FLAG(thread))
 Create a new thread to execute the given operation. More...
 
bool isValid () const
 
void sync ()
 Synchronisation barrier. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from Thread
static void syncPoint ()
 counterpart of the synchronisation barrier, to be called from within the thread to be synchronised. More...
 
- Protected Member Functions inherited from Thread
 Thread ()
 
bool invokedWithinThread () const
 determine if the currently executing code runs within this thread More...
 
template<class FUN >
void launchThread (Literal purpose, FUN &&operation, NoBugFlag logging_flag, uint additionalFlags=0)
 
- Protected Attributes inherited from Thread
LumieraThread threadHandle_
 

Constructor & Destructor Documentation

ThreadJoinable ( Literal  purpose,
FUN &&  operation,
NoBugFlag  logging_flag = &NOBUG_FLAG(thread) 
)
inline

Definition at line 264 of file thread-wrapper.hpp.

Member Function Documentation

lib::Result<void> join ( )
inline

put the caller into a blocking wait until this thread has terminated.

Returns
token signalling either success or failure. The caller can find out by invoking isValid() or maybeThrow() on this result token

Definition at line 279 of file thread-wrapper.hpp.

References Thread::isValid(), and lumiera_thread_join().

Referenced by ThreadWrapperJoin_test::getError(), SyncClasslock_test::run(), ThreadWrapperJoin_test::simpleUse(), ThreadWrapperJoin_test::wrongUse(), DummyTick::~DummyTick(), and TickService::~TickService().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

+ Inheritance diagram for ThreadJoinable:
+ Collaboration diagram for ThreadJoinable:

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