aboutsummaryrefslogtreecommitdiff
path: root/lib/base/thread.h
blob: 56b74bed3abd5544134997360e8cc88b6899d23c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#ifndef __lib_base_thread_h
#define __lib_base_thread_h

#include <pthread.h>

class eThread
{
	pthread_t the_thread;
	static void *wrapper(void *ptr);
	int alive;
public:
	bool thread_running() { return alive; }
	eThread();
	virtual ~eThread();
	
	void run();

	virtual void thread()=0;
	
	void kill();
};

#endif