This commit is contained in:
shadow8t4 2015-11-09 17:18:56 -06:00
commit f4109d605f
2 changed files with 6 additions and 10 deletions

View file

@ -30,6 +30,8 @@ public:
empty = new Semaphore(b_val);
}
int get_val(){return b_val;}
void set_b(int b){ b_val = b;}
int get_val(){ return b_val; }

View file

@ -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(Request_Buffer->get_val() != 0){
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(){
}