![]() |
Discrete Dipole Approximation Project
1.0
Plugin based Discrete Dipole Approximation (DDA) software package.
|
#include "thread.h"
Public Member Functions | |
Thread (void *(*func(void *)), void *arg) | |
Constructor. More... | |
~Thread () | |
Destructor. More... | |
virtual void * | Entry (void *arg) |
Thread entry point, this function simply calls the function pointer pass to the Constructor. More... | |
bool | Join (unsigned long timeout, bool execpt=true) |
Join the thread, blocking for timeout seconds or thread completion which ever is shorter. More... | |
bool | Run () |
Lanuches the thread. More... | |
|
inline |
Constructs a new Thread object. This will run func
with arg
when started.
[in] | void | function to run when thread starts. |
|
inline |
Joins the thread and destroys the internal thread handle.
|
virtual |
[in] | arg | argument to passed on object creation. |
|
inline |
If timeout
is 0 block until thread completion.
true
if thread completes, false
on timeout TimeoutException | Raised if except is true (default) |
[in] | timeout | Time limit for blocking. |
[in] | execpt | Raise exception on timeout |
|
inline |
true
if thread starts ok, false
otherwise.