V7
This commit is contained in:
parent
555bdc7e41
commit
9a81d2895f
2 changed files with 6 additions and 10 deletions
|
@ -30,6 +30,8 @@ public:
|
|||
empty = new Semaphore(b_val);
|
||||
}
|
||||
|
||||
int get_val(){return b_val;}
|
||||
|
||||
void set_b(int b){ b_val = b;}
|
||||
|
||||
void push(string item);
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
|
||||
using namespace std;
|
||||
|
||||
// djfkdjsfkl
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
/* DATA STRUCTURES */
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
@ -121,12 +121,7 @@ int main(int argc, char * argv[]) {
|
|||
usleep(1000000);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
*/
|
||||
|
||||
void* Req_Thread(string name){
|
||||
cout << "Name: " << name << endl;
|
||||
Request_Buffer->push("data" + name);
|
||||
}
|
||||
|
||||
|
@ -137,16 +132,15 @@ void* Worker_Thread(char* arg[], RequestChannel* chan){
|
|||
//RequestChannel * channel_ret = new RequestChannel(channel_name, RequestChannel::CLIENT_SIDE);
|
||||
while(true){
|
||||
|
||||
|
||||
string req = Request_Buffer->pop();
|
||||
cout << "Request: " << req << endl;
|
||||
string response = chan->send_request(req);
|
||||
cout << "Response: " << response << endl;
|
||||
|
||||
//string local_send_request(req);
|
||||
}
|
||||
chan->send_request("quit");
|
||||
}
|
||||
|
||||
|
||||
|
||||
string local_send_request(){
|
||||
|
||||
}
|
||||
|
|
Reference in a new issue