Realistic 3D camera system
3D camera system components
|
A simple abstraction for starting threads. More...
#include <thread.hpp>
Public Member Functions | |
template<typename Function > | |
thread (Function f) | |
Start a new thread that executes the supplied function. More... | |
~thread () | |
Destructor. More... | |
void | join () |
Wait for the thread to exit. More... | |
A simple abstraction for starting threads.
The asio::thread class implements the smallest possible subset of the functionality of boost::thread. It is intended to be used only for starting a thread and waiting for it to exit. If more extensive threading capabilities are required, you are strongly advised to use something else.
Definition at line 48 of file thread.hpp.
|
inlineexplicit |
Start a new thread that executes the supplied function.
This constructor creates a new thread that will execute the given function or function object.
f | The function or function object to be run in the thread. The function signature must be: void f(); |
Definition at line 61 of file thread.hpp.
|
inline |
Destructor.
Definition at line 67 of file thread.hpp.
|
inline |
Wait for the thread to exit.
This function will block until the thread has exited.
If this function is not called before the thread object is destroyed, the thread itself will continue to run until completion. You will, however, no longer have the ability to wait for it to exit.
Definition at line 79 of file thread.hpp.