My Project
Thread.h
1
#ifndef __Thread_h__
2
#define __Thread_h__
3
4
#include "includes"
5
#include "Log.h"
6
#include "Object.h"
7
#include "TCPSession.h"
8
#include "ThreadScope.h"
9
10
namespace
core {
11
12
class
EPoll;
13
21
22
class
Thread
:
public
Object
{
23
24
public
:
25
Thread
(
EPoll
&ePoll);
26
Thread
(
EPoll
&ePoll,
ThreadScope
*thread);
27
~
Thread
();
28
32
33
void
start
();
34
void
join();
35
std::string getStatus();
36
pid_t getThreadId();
37
int
getCount();
38
void
output(std::stringstream &data);
39
40
private
:
41
EPoll
&ePoll;
// The EPoll control object.
42
std::string status;
43
int
count;
44
std::thread *_thread;
45
void
print_thread_start_log();
46
pid_t threadId;
47
void
run();
48
ThreadScope
*thread;
49
50
};
51
52
}
53
54
#endif
core::EPoll
Definition:
EPoll.h:31
core::ThreadScope
Definition:
ThreadScope.h:6
core::Object
Definition:
Object.h:8
core::Thread::start
void start()
Definition:
Thread.cpp:11
core::Thread
Definition:
Thread.h:22
Generated by
1.8.17