Lumiera 0.pre.04~rc.1
»edit your freedom«
Loading...
Searching...
No Matches
Thread Class Reference

#include "lib/thread.hpp"

Description

A thin convenience wrapper to simplify thread-handling.

The implementation is backed by the C++ standard library. Using this wrapper...

  • removes the need to join() threads, catches and ignores exceptions.
  • allows to bind to various kinds of functions including member functions The new thread starts immediately within the ctor; after returning, the new thread has already copied the arguments and indeed actively started to run.
    Warning
    The destructor waits for a short grace period of 20ms, but calls std::terminate afterwards, should the thread still be active then.

Definition at line 648 of file thread.hpp.

Additional Inherited Members

- Static Public Member Functions inherited from ThreadLifecycle< thread::PolicyLaunchOnly >
static auto buildInvocation (W &wrapper, tuple< INVO... > &&invocation)
 Build the invocation tuple, using invokeThreadFunction to delegate to the user-provided functor and arguments.
 
static auto buildLauncher (INVO &&...args)
 Build a λ actually to launch the given thread operation later, after the thread-wrapper-object is fully initialised.
 
- Public Member Functions inherited from ThreadLifecycle< thread::PolicyLaunchOnly >
 ThreadLifecycle (Launch launcher)
 Primary constructor: Launch the new thread with flexible configuration.
 
 ThreadLifecycle (string const &threadID, FUN &&threadFunction, ARGS &&...args)
 Create a new thread to execute the given operation.
 
 ThreadLifecycle (void(SUB::*memFun)(ARGS...), ARGS ...args)
 Special variant to bind a subclass member function as thread operation.
 
 operator bool () const
 Is this thread »active« and thus tied to OS resources?
 
- Protected Member Functions inherited from ThreadLifecycle< thread::PolicyLaunchOnly >
 ~ThreadLifecycle ()
 
 ThreadLifecycle ()
 derived classes may create a disabled thread
 
+ Inheritance diagram for Thread:
+ Collaboration diagram for Thread:

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