Home2L - C/C++ API v1.4-0-g38cc (2024-05-25)
Smart Tools for a Private Home
|
Class to wrap (POSIX) threads.
The thread routine can be supplied in the following ways:
Please not, that there is intenionally no 'cancel()' functionality, since this is a) presently not supported under Android, and b) almost certainly introduces inproper code with race conditions.
#include "base.H"
Public Member Functions | |
void | Start (FThreadRoutine *_routine, void *_data=NULL) |
Run the supplied function _routine in the background passing _data as an argument. | |
void | Start () |
Run the virtual method Run() in the background. | |
void * | Join () |
Join with the background thread. | |
bool | IsRunning () |
(only for main thread) | |
Protected Member Functions | |
virtual void * | Run () |
Main thread routine (to be overloaded) | |