-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathproc.h
More file actions
45 lines (43 loc) · 997 Bytes
/
Copy pathproc.h
File metadata and controls
45 lines (43 loc) · 997 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/*
* proc.h
*
* Created on: 2017年6月15日
* Author: zjbpoping
*/
#ifndef COMPUTE_H_
#define COMPUTE_H_
#include "node.h"
#include "message.h"
#include "manager.h"
#include <string>
namespace ps{
class Proc{
public:
explicit Proc(int proc_id);
virtual ~Proc(){
delete customer;
customer=nullptr;
}
//virtual inline int Request();
virtual inline void Wait(int timestamp){
customer->WaitRequest(timestamp);
};
// virtual inline void Response();
// //using Handle = std::function<void()>;
// virtual inline void set_request_handle(const Handle& request){
// request_handle_=request;
// }
// virtual inline void set_response_handle(const Handle& response){
// response_handle_=response;
// }
virtual inline Customer* get_customer(){
return customer;
}
protected:
inline Proc():customer(nullptr){};
// Handle request_handle_;
// Handle response_handle_;
Customer* customer;
};
}
#endif