Hi Dw. I am developing a client server multi-thread application. This application uses signals(certain messages as signals), in order to perform a task for a client. For instance if a client wants to login, the client send a message as: `Login:<username>:<password>` and on a server I first check if the message contains `:` and if it does then I split the message using `:` as a split. I am using the client server code from http://www.vb.net-informations.com/communications/vb.net_multithreaded_server_socket_programming.htm But I didn't use it as Console its both WinForms. I'm facing avery hug problem here. All of my activity codes are under the …

Member Avatar
Member Avatar
+0 forum 12

So, my problem is that I want to run a process every 5 minutes, however I also want a console input which can modify its preferences and call functions depending console input. How can this be done system-independently?

Member Avatar
Member Avatar
+0 forum 1

I am learning concurrency programming, I try my best yet can't solve the problem [CODE] boost::mutex mut; std::vector<int> int_vector; boost::condition_variable int_cond; void data_preparation_thread() { while(int_vector.size() != 10) { std::cout<<"data preparation thread :: vector size = "<<int_vector.size()<<std::endl; boost::lock_guard<boost::mutex> lk(mut); int_vector.push_back(4); int_cond.notify_one(); } } void data_processing_thread() { while(1) { std::cout<<"front :: data processing thread :: vector size = "<<int_vector.size()<<std::endl; boost::unique_lock<boost::mutex> lk(mut); std::cout<<"back :: data processing thread :: vector size = "<<int_vector.size()<<std::endl; int_cond.wait(lk, boost::bind( std::equal_to<int>(), int_vector.size(), 10) ); std::cout<<"int_cond = true\n"; lk.unlock(); break; } } void testCondVar() { boost::thread t1(data_processing_thread); boost::thread t2(data_preparation_thread); t1.join(); t2.join(); } [/CODE] After I call testCondVar() in main(), the …

Member Avatar
Member Avatar
+0 forum 2

The End.