Lumiera  0.pre.03
»edit your freedom«
PolicyResultJoin< BAS, RES > Struct Template Reference

#include "lib/thread.hpp"

Description

template<class BAS, typename RES>
struct lib::thread::PolicyResultJoin< BAS, RES >

Thread Lifecycle Policy:

  • thread with the ability to publish results
  • return value from the thread function will be stored
  • errors in thread function will likewise be captured and retained
  • thread must be joined after termination of the thread function
    Warning
    unjoined thread on dtor call will be a fatal error (std::terminate)

Definition at line 344 of file thread.hpp.

Public Member Functions

void handle_after_thread ()
 
void handle_loose_thread ()
 
template<class FUN , typename... ARGS>
void perform_thread_function (FUN &&callable, ARGS &&...args)
 

Public Attributes

lib::Result< RES > result_ {error::Logic{"No result yet, thread still running; need to join() first."}}
 Wrapper to capture a success/failure indicator and possibly a computation result.
 
+ Inheritance diagram for PolicyResultJoin< BAS, RES >:
+ Collaboration diagram for PolicyResultJoin< BAS, RES >:

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