mirror of https://github.com/Icinga/icinga2.git
28 lines
307 B
C++
28 lines
307 B
C++
#ifndef THREAD_H
|
|
#define THREAD_H
|
|
|
|
namespace icinga
|
|
{
|
|
|
|
class I2_BASE_API thread
|
|
{
|
|
private:
|
|
#ifdef _WIN32
|
|
HANDLE m_Thread;
|
|
#else
|
|
pthread_t m_Thread;
|
|
#endif
|
|
|
|
public:
|
|
thread(void (*callback)(void *));
|
|
~thread(void);
|
|
|
|
void start(void);
|
|
void terminate(void);
|
|
void join(void);
|
|
};
|
|
|
|
}
|
|
|
|
#endif /* THREAD_H */
|